本文整理匯總了Java中org.eclipse.draw2d.Figure.setLayoutManager方法的典型用法代碼示例。如果您正苦於以下問題:Java Figure.setLayoutManager方法的具體用法?Java Figure.setLayoutManager怎麽用?Java Figure.setLayoutManager使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.draw2d.Figure
的用法示例。
在下文中一共展示了Figure.setLayoutManager方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createContents
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
private static Figure createContents() {
Figure contents = new Figure();
XYLayout layout = new XYLayout();
contents.setLayoutManager(layout);
Button button = new Button("Hello World");
layout.setConstraint(button, new Rectangle(0, 0, -1, -1));
contents.add(button);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent actionevent) {
setBrightness();
}
});
String path = "C:\\Users\\Public\\Pictures\\Sample Pictures\\Oryx Antelope.jpg";
image = new Image(Display.getDefault(), path);
imageFigure = new ImageFigure(image);
layout.setConstraint(imageFigure, new Rectangle(0, 30, -1, -1));
contents.add(imageFigure);
return contents;
}
示例2: createContents
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected void createContents() {
// Name Label
nameFigure = new SyntaxColoringLabel();
nameFigure.setAlignment(PositionConstants.CENTER);
this.add(nameFigure, GridDataFactory.fillDefaults().grab(true, false)
.getData());
// Text compartment
textCompartmentPane = new Figure();
textCompartmentPane.setLayoutManager(new StackLayout());
this.add(textCompartmentPane,
GridDataFactory.fillDefaults().grab(true, true).getData());
figureCompartmentPane = new Figure();
figureCompartmentPane.setLayoutManager(new StackLayout());
this.add(figureCompartmentPane,
GridDataFactory.fillDefaults().grab(true, true).getData());
}
示例3: createMain
import org.eclipse.draw2d.Figure; //導入方法依賴的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;
}
示例4: createColumnArea
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void createColumnArea(final IFigure columns) {
initColumnArea(columns);
columns.setBorder(new MarginBorder(0, 0, 0, 0));
columns.setBackgroundColor(ColorConstants.white);
columns.setOpaque(true);
final Figure centerFigure = new Figure();
centerFigure.setLayoutManager(new BorderLayout());
centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));
centerFigure.add(columns, BorderLayout.CENTER);
getTableFigure().add(centerFigure, BorderLayout.CENTER);
}
示例5: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(final Figure top) {
final ToolbarLayout topLayout = new ToolbarLayout();
topLayout.setMinorAlignment(OrderedLayout.ALIGN_TOPLEFT);
topLayout.setStretchMinorAxis(true);
top.setLayoutManager(topLayout);
nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
top.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(getTextColor());
separater.setOpaque(true);
top.add(separater);
}
示例6: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(Figure top) {
ToolbarLayout topLayout = new ToolbarLayout();
topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
topLayout.setStretchMinorAxis(true);
top.setLayoutManager(topLayout);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
top.add(nameLabel);
Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(this.getTextColor());
separater.setOpaque(true);
top.add(separater);
}
示例7: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
public void initTitleBar(Figure top) {
final ToolbarLayout topLayout = new ToolbarLayout();
topLayout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT);
topLayout.setStretchMinorAxis(true);
top.setLayoutManager(topLayout);
this.nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(5, 20, 5, 20)));
top.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(getTextColor());
separater.setOpaque(true);
top.add(separater);
}
示例8: createColumnArea
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void createColumnArea(IFigure columns) {
this.initColumnArea(columns);
columns.setBorder(new MarginBorder(0, 0, 0, 0));
columns.setBackgroundColor(ColorConstants.white);
columns.setOpaque(true);
Figure centerFigure = new Figure();
centerFigure.setLayoutManager(new BorderLayout());
centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));
centerFigure.add(columns, BorderLayout.CENTER);
this.getTableFigure().add(centerFigure, BorderLayout.CENTER);
}
示例9: createColumnArea
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void createColumnArea() {
columns=new Figure();
this.initColumnArea(columns);
columns.setBorder(new MarginBorder(0, 0, 0, 0));
columns.setBackgroundColor(ColorConstants.white);
columns.setOpaque(true);
Figure centerFigure = new Figure();
centerFigure.setLayoutManager(new BorderLayout());
centerFigure.setBorder(new MarginBorder(new Insets(0, 2, 0, 2)));
centerFigure.setBackgroundColor(new Color(null,192,192,192));
centerFigure.add(columns, BorderLayout.CENTER);
this.add(centerFigure, BorderLayout.CENTER);
}
示例10: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
Figure title = new Figure();
top.add(title, BorderLayout.TOP);
title.setLayoutManager(new FlowLayout());
title.setBackgroundColor(ColorConstants.darkGreen);
ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(Activator.getImageDescriptor(ImageResource.TABLE).createImage());
title.add(image);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(this.nameLabel);
Figure separater = new Figure();
separater.setSize(100, 100);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(false);
top.add(separater, BorderLayout.BOTTOM);
}
示例11: ContourMemberTableFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
public ContourMemberTableFigure()
{
identifierColumn = new Figure();
typeColumn = new Figure();
valueColumn = new Figure();
identifierColumn.setBorder(ContourMemberTableFigure.IDENTIFIER_COLUMN_BORDER);
typeColumn.setBorder(ContourMemberTableFigure.TYPE_COLUMN_BORDER);
valueColumn.setBorder(ContourMemberTableFigure.VALUE_COLUMN_BORDER);
final ToolbarLayout identifierLayout = new ToolbarLayout(false);
identifierLayout.setStretchMinorAxis(true);
identifierColumn.setLayoutManager(identifierLayout);
final ToolbarLayout typeLayout = new ToolbarLayout(false);
typeLayout.setStretchMinorAxis(true);
typeColumn.setLayoutManager(typeLayout);
final ToolbarLayout valueLayout = new ToolbarLayout(false);
valueLayout.setStretchMinorAxis(true);
valueColumn.setLayoutManager(valueLayout);
final BorderLayout layout = new BorderLayout();
setLayoutManager(layout);
add(identifierColumn, BorderLayout.LEFT);
add(typeColumn, BorderLayout.CENTER);
add(valueColumn, BorderLayout.RIGHT);
}
示例12: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected IFigure createFigure( )
{
Figure figure = new FirstCellFigure();
contentPane = new Figure();
ReportFlowLayout rflayout = new ReportFlowLayout( )
{
public void layout( IFigure parent )
{
super.layout( parent );
}
};
contentPane.setLayoutManager( rflayout );
contentPane.setOpaque( false );
figure.add( contentPane );
controlFigure = new ControlFigure(this, new NothingLocator());
figure.add( controlFigure );
return figure;
}
示例13: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
Figure title = new Figure();
top.add(title, BorderLayout.TOP);
title.setLayoutManager(new FlowLayout());
title.setBackgroundColor(ColorConstants.darkGreen);
ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(Activator.getImageDescriptor(ImageResource.VIEW).createImage());
title.add(image);
this.nameLabel = new Label();
this.nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(this.nameLabel);
Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}
示例14: createEntryGrid
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
private IFigure createEntryGrid ( final Figure connLayer )
{
final Figure figure = new Figure ();
figure.setLayoutManager ( new GridLayout ( 1, false ) );
figure.add ( this.presetCeil = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
figure.add ( this.presetHH = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
figure.add ( this.presetH = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
figure.add ( this.currentLabel = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
figure.add ( this.presetL = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
figure.add ( this.presetLL = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
figure.add ( this.presetFloor = new Label ( "" ), new GridData ( GridData.CENTER, GridData.FILL, true, true ) ); //$NON-NLS-1$
createConnection ( connLayer, this.presetCeil, this.rectCeil );
createConnection ( connLayer, this.presetHH, this.triHH );
createConnection ( connLayer, this.presetH, this.triH );
createConnection ( connLayer, this.presetL, this.triL );
createConnection ( connLayer, this.presetLL, this.triLL );
createConnection ( connLayer, this.presetFloor, this.rectFloor );
this.blinkerCeil = new LevelBlinker ( this.rectCeil );
this.blinkerHH = new LevelBlinker ( this.triHH );
this.blinkerH = new LevelBlinker ( this.triH );
this.blinkerL = new LevelBlinker ( this.triL );
this.blinkerLL = new LevelBlinker ( this.triLL );
this.blinkerFloor = new LevelBlinker ( this.rectFloor );
this.stylerCeil = new StateStyler ( this.blinkerCeil );
this.stylerHH = new StateStyler ( this.blinkerHH );
this.stylerH = new StateStyler ( this.blinkerH );
this.stylerL = new StateStyler ( this.blinkerL );
this.stylerLL = new StateStyler ( this.blinkerLL );
this.stylerFloor = new StateStyler ( this.blinkerFloor );
return figure;
}
示例15: createNaPanel
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
private IFigure createNaPanel ()
{
final Figure naPanel = new Figure ();
final BorderLayout layout = new BorderLayout ();
naPanel.setLayoutManager ( layout );
final Label label = new Label ();
label.setText ( Messages.AbstractBaseDraw2DDetailsPart_Label_NotAvail_Text );
naPanel.add ( label, BorderLayout.CENTER );
return naPanel;
}