本文整理汇总了Java中org.eclipse.draw2d.GridData类的典型用法代码示例。如果您正苦于以下问题:Java GridData类的具体用法?Java GridData怎么用?Java GridData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GridData类属于org.eclipse.draw2d包,在下文中一共展示了GridData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createMain
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
@Override
protected IFigure createMain ()
{
final Figure rootFigure = new Figure ();
rootFigure.setLayoutManager ( new GridLayout ( 3, true ) );
rootFigure.add ( makeHeader (), new GridData ( GridData.BEGINNING, GridData.CENTER, true, false, 3, 1 ) );
rootFigure.add ( createSourceValue (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) );
rootFigure.add ( new Figure () );
rootFigure.add ( createTargetValue (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) );
rootFigure.add ( new Figure () );
rootFigure.add ( createCommandPanel (), new GridData ( GridData.CENTER, GridData.CENTER, true, true ) );
createRoundArrow ( rootFigure );
return rootFigure;
}
开发者ID:eclipse,项目名称:neoscada,代码行数:21,代码来源:RoundDetailsPart.java示例2: convert
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
private Object convert ( final GridChild child )
{
final GridData gd = new GridData ();
gd.horizontalAlignment = convert ( child.getHorizontalAlignment () );
gd.verticalAlignment = convert ( child.getVerticalAlignment () );
gd.grabExcessHorizontalSpace = child.isGrabHorizontalSpace ();
gd.grabExcessVerticalSpace = child.isGrabVerticalSpace ();
gd.horizontalSpan = child.getSpanCols ();
gd.verticalSpan = child.getSpanRows ();
if ( child.getWidthHint () != null )
{
gd.widthHint = child.getWidthHint ();
}
if ( child.getHeightHint () != null )
{
gd.heightHint = child.getHeightHint ();
}
return gd;
}
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:GridContainerController.java示例3: showPrivateFields
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
void showPrivateFields() {
if(hiddenFields == null || visibilityOpen)
return;
visibilityOpen = true;
getLayoutManager().setConstraint(hiddenFields, new GridData(SWT.FILL, SWT.DEFAULT, true, true));
hiddenFields.setToolTip(new Label("hidden fields"));
for (IVariableModel<?> var : model.getFields()) {
if(!var.isVisible()) {
PandionJFigure<?> fieldFig = figureProvider.getFigure(var, false);
hiddenFields.add(fieldFig);
hiddenFields.getLayoutManager().setConstraint(fieldFig, new GridData(SWT.RIGHT, SWT.FILL, true, false));
setObjectContainerVisible();
if(var instanceof IReferenceModel)
objectContainer.addObjectAndPointer((IReferenceModel) var, ((ReferenceFigure) fieldFig).getAnchor());
}
}
fig.getLayoutManager().layout(fig);
runtimeViewer.updateLayout();
}
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:21,代码来源:ObjectFigure.java示例4: ReferenceFigure
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
public ReferenceFigure(IReferenceModel model) {
super(model, false);
GridLayout layout = new GridLayout(2, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.horizontalSpacing = 3;
layout.verticalSpacing = 0;
setLayoutManager(layout);
label = new Label(model.getName());
label.setForegroundColor(ColorConstants.black);
FontManager.setFont(label, PandionJConstants.VAR_FONT_SIZE);
String tooltip = Utils.getTooltip(model);
Collection<String> tags = model.getTags();
if(!tags.isEmpty())
tooltip += "\ntags: " + String.join(", ", tags);
label.setToolTip(new Label(tooltip));
add(label);
refLabel = new ReferenceLabel(model);
add(refLabel);
layout.setConstraint(refLabel, new GridData(PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH));
}
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:26,代码来源:ReferenceFigure.java示例5: performDirectEdit
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
/**
* performDirectEdit void
*/
protected void performDirectEdit(Request req) {
if (getParent() != null && getParent() instanceof ScrollableEditPart) {
AbstractNode node = (AbstractNode) getParent().getModel();
Label label = (Label) getFigure();
if (((AbstractNode) node).getNodeType().equals(NodeType.PROVIDED_INTERFACES)) {
return;
} else if (((AbstractNode) node).getNodeType().equals(NodeType.REQUIRED_INTERFACES)) {
return;
}
setFigureLayout(label, GridData.BEGINNING);
} else if (getParent() != null && getParent() instanceof AbstractChildCompartmentEditPart) {
return;
}
if (directManager == null) {
directManager = new DirectEditorManager(this,
TextCellEditor.class,
new DirectEditCellEditorLocator(getFigure()));
}
directManager.show();
}
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:26,代码来源:NotationNameEditPart.java示例6: refreshVisuals
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
@Override
protected void refreshVisuals()
{
contentPane.setName(getDataset().getName());
ChartSet parent =
((Chart) getParent().getParent().getParent().getModel()).getParent();
boolean horizontal = parent.getOrientation() == Orientation.HORIZONTAL;
((DirectionalShape) getFigure()).setVertical(!horizontal);
if (horizontal)
{
contentPane.setVertical(false);
setLayoutConstraint(this, getFigure(), new GridData(GridData.FILL,
GridData.FILL, true, false));
}
else
{
contentPane.setVertical(true);
setLayoutConstraint(this, getFigure(), new GridData(GridData.CENTER,
GridData.FILL, false, true));
}
}
开发者ID:debrief,项目名称:limpet,代码行数:27,代码来源:DatasetEditPart.java示例7: refreshVisuals
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
@Override
protected void refreshVisuals()
{
String name = getModel().getName();
ChartFigure chartFigure = (ChartFigure) getFigure();
chartFigure.setName(name);
chartFigure
.setVertical(getModel().getParent().getOrientation() == Orientation.VERTICAL);
GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = SWT.FILL;
gridData.verticalAlignment = SWT.FILL;
((GraphicalEditPart) getParent()).setLayoutConstraint(this, figure,
gridData);
}
开发者ID:debrief,项目名称:limpet,代码行数:20,代码来源:ChartEditPart.java示例8: createFigure
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
@Override
protected IFigure createFigure()
{
final RectangleFigure figure = new RectangleFigure();
figure.setOutline(false);
final Color borderCol = Display.getCurrent().getSystemColor(SWT.COLOR_GRAY);
final Border figureBorder = new LineBorder(borderCol, 2);
figure.setBorder(figureBorder);
figure.setLayoutManager(new GridLayout());
nameLabel = new DirectionalLabel(Activator.FONT_8);
final ChartPaneEditPart.AxisLandingPad pad =
(ChartPaneEditPart.AxisLandingPad) getModel();
nameLabel.setText(pad.pos == ChartPanePosition.MIN ? "Min Axis"
: "Max Axis");
figure.add(nameLabel);
figure.getLayoutManager().setConstraint(nameLabel, new GridData(
GridData.FILL, GridData.FILL, true, true));
return figure;
}
开发者ID:debrief,项目名称:limpet,代码行数:25,代码来源:AxisLandingPadEditPart.java示例9: refreshVisuals
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
@Override
protected void refreshVisuals()
{
boolean horizontal = ((AxisLandingPad) getModel()).chart.getParent()
.getOrientation() == Orientation.HORIZONTAL;
nameLabel.setVertical(!horizontal);
if (horizontal)
{
((GraphicalEditPart) getParent()).setLayoutConstraint(this, figure,
new GridData(GridData.FILL, GridData.CENTER, true, false));
}
else
{
((GraphicalEditPart) getParent()).setLayoutConstraint(this, figure,
new GridData(GridData.CENTER, GridData.FILL, false, true));
}
figure.invalidate();
}
开发者ID:debrief,项目名称:limpet,代码行数:20,代码来源:AxisLandingPadEditPart.java示例10: refreshVisuals
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
@Override
protected void refreshVisuals()
{
GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.grabExcessVerticalSpace = true;
gridData.horizontalAlignment = SWT.FILL;
gridData.verticalAlignment = SWT.FILL;
GraphicalEditPart parent = (GraphicalEditPart) getParent();
parent.setLayoutConstraint(this, figure, gridData);
GridLayout layoutManager = (GridLayout) getFigure().getLayoutManager();
layoutManager.numColumns =
((ChartSet) parent.getModel()).getOrientation() == Orientation.HORIZONTAL
? getModelChildren().size() : 1;
layoutManager.invalidate();
}
开发者ID:debrief,项目名称:limpet,代码行数:19,代码来源:ChartsPanelEditPart.java示例11: createContents
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
/**
* @generated
*/
private void createContents() {
fFigureRoleNameLabel = new WrappingLabel();
fFigureRoleNameLabel.setText("");
GridData constraintFFigureRoleNameLabel = new GridData();
constraintFFigureRoleNameLabel.verticalAlignment = GridData.CENTER;
constraintFFigureRoleNameLabel.horizontalAlignment = GridData.CENTER;
constraintFFigureRoleNameLabel.horizontalIndent = 0;
constraintFFigureRoleNameLabel.horizontalSpan = 1;
constraintFFigureRoleNameLabel.verticalSpan = 1;
constraintFFigureRoleNameLabel.grabExcessHorizontalSpace = true;
constraintFFigureRoleNameLabel.grabExcessVerticalSpace = true;
this.add(fFigureRoleNameLabel, constraintFFigureRoleNameLabel);
}
开发者ID:road-framework,项目名称:ROADDesigner,代码行数:20,代码来源:RoleEditPart.java示例12: hideIconView
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
void hideIconView( final Column column ) {
iconViewColumn = null;
column.cellColumn.setBorder( null );
focusLine.setVisible( true );
for ( final Column col : focusTree.columns ) {
col.cellColumn.setVisible( true );
}
setCellColumnLayoutManager( column );
for ( final Object child : column.cellColumn.getChildren() ) {
final Cell cell = ( Cell ) child;
cell.setPreferredSize( null );
cell.icon.setImage( focusTree.viewModel.icon( cell.item ) );
final GridData gridData = new GridData( SWT.FILL, SWT.DEFAULT, false, false );
gridData.widthHint = column.cellWidthBeforeIconView;
column.cellColumn.setConstraint( cell, gridData );
}
column.cellColumn.setLocation( new Point( column.bounds.x + columnMargins.width, 0 ) );
column.cellColumn.setSize( column.cellColumn.getPreferredSize() );
focusCell( column, column.focusCell );
}
开发者ID:Polyglotter,项目名称:chrysalix,代码行数:21,代码来源:FocusTreeCanvas.java示例13: showIconView
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
void showIconView( final Column column ) {
iconViewColumn = column;
focusLine.setVisible( false );
for ( final Column col : focusTree.columns ) {
if ( col != column ) col.cellColumn.setVisible( false );
}
column.cellWidthBeforeIconView = 0;
for ( final Object figure : column.cellColumn.getChildren() ) {
final Cell cell = ( Cell ) figure;
if ( column.cellWidthBeforeIconView == 0 ) column.cellWidthBeforeIconView =
( ( GridData ) column.cellColumn.getLayoutManager().getConstraint( cell ) ).widthHint;
cell.icon.setImage( focusTree.viewModel.iconViewIcon( cell.item ) );
final Dimension size = cell.getPreferredSize( iconViewCellWidth, SWT.DEFAULT );
cell.setPreferredSize( size );
}
final FlowLayout layout = new FlowLayout();
layout.setMinorAlignment( OrderedLayout.ALIGN_BOTTOMRIGHT );
layout.setMajorSpacing( columnMargins.width );
layout.setMinorSpacing( columnMargins.height );
column.cellColumn.setLayoutManager( layout );
column.cellColumn.setBorder( new MarginBorder( columnMargins.height, columnMargins.width,
columnMargins.height, columnMargins.width ) );
updateIconViewBounds();
}
开发者ID:Polyglotter,项目名称:chrysalix,代码行数:25,代码来源:FocusTreeCanvas.java示例14: updateColumnWidth
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
void updateColumnWidth( final Column column,
final int width,
final boolean visible ) {
final int delta = width - column.bounds.width;
column.bounds.width = width;
final Dimension cellColumnSize = column.cellColumn.getSize();
column.cellColumn.setSize( cellColumnSize.width + delta, cellColumnSize.height );
for ( final Object cell : column.cellColumn.getChildren() )
( ( GridData ) column.cellColumn.getLayoutManager().getConstraint( ( IFigure ) cell ) ).widthHint += delta;
column.cellColumn.setVisible( visible );
boolean afterColumn = false;
for ( final Column col : focusTree.columns )
if ( col == column ) afterColumn = true;
else if ( afterColumn ) {
final Point cellColumnLocation = col.cellColumn.getLocation();
cellColumnLocation.x += delta;
col.cellColumn.setLocation( cellColumnLocation );
col.cellColumn.revalidate();
col.bounds.x += delta;
}
final Dimension canvasSize = canvas.getSize();
canvas.setSize( canvasSize.width + delta, canvasSize.height );
canvas.revalidate();
}
开发者ID:Polyglotter,项目名称:chrysalix,代码行数:25,代码来源:FocusTreeCanvas.java示例15: createHeader
import org.eclipse.draw2d.GridData; //导入依赖的package包/类
private void createHeader() {
Figure top = new Figure();
GridLayout topLayout = new GridLayout(3, false);
topLayout.horizontalSpacing = 0;
topLayout.verticalSpacing = 0;
topLayout.marginHeight = 0;
topLayout.marginWidth = 0;
top.setLayoutManager(topLayout);
leftExpander = new ProcessExpander(node, Side.INPUT);
rightExpander = new ProcessExpander(node, Side.OUTPUT);
top.add(leftExpander, new GridData(SWT.LEFT, SWT.CENTER, false, false));
top.add(new Label(node.getName()), new GridData(SWT.FILL, SWT.FILL, true, false));
top.add(rightExpander, new GridData(SWT.RIGHT, SWT.CENTER, false, false));
add(top, new GridData(SWT.FILL, SWT.FILL, true, false));
GridData dummyGridData = new GridData(SWT.FILL, SWT.FILL, true, false);
dummyGridData.heightHint = TEXT_HEIGHT + 3 * MARGIN_HEIGHT;
add(new Figure(), dummyGridData);
}
开发者ID:GreenDelta,项目名称:olca-app,代码行数:19,代码来源:ProcessFigure.java本文标签属性:
示例:示例的拼音
代码:代码转换器
java:java自行车
GridData:griddata在matlab是如何应用