本文整理匯總了Java中org.eclipse.draw2d.Figure.setSize方法的典型用法代碼示例。如果您正苦於以下問題:Java Figure.setSize方法的具體用法?Java Figure.setSize怎麽用?Java Figure.setSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.draw2d.Figure
的用法示例。
在下文中一共展示了Figure.setSize方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: 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);
}
示例2: 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);
}
示例3: 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);
}
示例4: 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);
}
示例5: 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);
}
示例6: ColorFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
ColorFigure() {
setLayoutManager(new GridLayout(2, false));
colorFig = new Figure();
colorFig.setSize(PandionJConstants.POSITION_WIDTH, PandionJConstants.POSITION_WIDTH);
add(colorFig);
text = new Label();
text.setForegroundColor(ColorConstants.black);
add(text);
}
示例7: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(final Figure top) {
top.setLayoutManager(new BorderLayout());
final Figure title = new Figure();
top.add(title, BorderLayout.TOP);
final FlowLayout titleLayout = new FlowLayout();
titleLayout.setMinorAlignment(OrderedLayout.ALIGN_CENTER);
title.setLayoutManager(titleLayout);
final ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(ERDiagramActivator.getImage(getTableFigure().getImageKey()));
title.add(image);
nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20)));
title.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}
示例8: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
/**
* {@inheritDoc}
*/
@Override
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
Figure title = new Figure();
top.add(title, BorderLayout.TOP);
FlowLayout titleLayout = new FlowLayout();
titleLayout.setMinorAlignment(FlowLayout.ALIGN_CENTER);
title.setLayoutManager(titleLayout);
ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2)));
image.setImage(ERDiagramActivator.getImage(this.getTableFigure().getImageKey()));
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);
}
示例9: initTitleBar
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
@Override
public void initTitleBar(Figure top) {
top.setLayoutManager(new BorderLayout());
final FlowLayout layout = new FlowLayout();
layout.setStretchMinorAxis(true);
final Figure title = new Figure();
top.add(title, BorderLayout.TOP);
title.setLayoutManager(layout);
title.setBorder(new MarginBorder(new Insets(2, 2, 2, 2)));
final ImageFigure image = new ImageFigure();
image.setBorder(new MarginBorder(new Insets(0, 0, 0, 0)));
image.setImage(Activator.getImage(getTableFigure().getImageKey()));
title.add(image);
this.nameLabel = new Label();
nameLabel.setBorder(new MarginBorder(new Insets(0, 0, 0, 20)));
title.add(nameLabel);
final Figure separater = new Figure();
separater.setSize(-1, 1);
separater.setBackgroundColor(ColorConstants.black);
separater.setOpaque(true);
top.add(separater, BorderLayout.BOTTOM);
}
示例10: createFigure
import org.eclipse.draw2d.Figure; //導入方法依賴的package包/類
protected IFigure createFigure( )
{
Figure figure = new Figure( );
figure.setMaximumSize( new Dimension( 0, 0 ) );
figure.setSize( 0, 0 );
return figure;
}