本文整理汇总了Java中org.eclipse.draw2d.FlowLayout类的典型用法代码示例。如果您正苦于以下问题:Java FlowLayout类的具体用法?Java FlowLayout怎么用?Java FlowLayout使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FlowLayout类属于org.eclipse.draw2d包,在下文中一共展示了FlowLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
@Override
protected IFigure createFigure() {
final LineLayout layout = new LineLayout();
layout.setHorizontal(true);
layout.setMajorAlignment(FlowLayout.ALIGN_TOPLEFT);
layout.setMinorAlignment(FlowLayout.ALIGN_BOTTOMRIGHT);
layout.setMinorSpacing(SPACING);
layout.setMargin(MARGIN);
FreeformLayer res = new FreeformLayer();
final Label toolTip = new Label();
toolTip.setFont(JFaceResources.getFont(JFaceResources.TEXT_FONT));
toolTip.setBackgroundColor(ColorConstants.tooltipBackground);
toolTip.setForegroundColor(ColorConstants.tooltipForeground);
toolTip.setText(getModel().getTimelineWindow().getProvider().getTextAt(getModel().getBranch()));
res.setToolTip(toolTip);
res.setLayoutManager(layout);
return res;
}
示例2: MethodWidget
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
MethodWidget(IMethod method) {
setLayoutManager(new FlowLayout());
button = new Button(shortSig(method));
button.setToolTip(new Label(longSig(method)));
button.setForegroundColor(ColorConstants.black);
FontManager.setFont(button, PandionJConstants.BUTTON_FONT_SIZE);
button.setEnabled(methodsEnabled);
add(button);
resultLabel = new Label();
resultLabel.setForegroundColor(ColorConstants.black);
add(resultLabel);
button.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent event) {
invoke(model, method, resultLabel);
}
});
}
示例3: StateFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public StateFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
this.setForegroundColor(THIS_FORE);
this.setBackgroundColor(THIS_BACK);
this.setPreferredSize(new Dimension(getMapMode().DPtoLP(40),
getMapMode().DPtoLP(40)));
createContents();
}
示例4: ColumnFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* Constructs a CheckBox with the passed text in its label.
*
* @param text
* The label text
* @since 2.0
*/
public ColumnFigure(String text, Image image) {
setLayoutManager(new FlowLayout(true));
checkbox = new CheckBox();
checkbox.addChangeListener(new ChangeListener() {
@Override
public void handleStateChanged(ChangeEvent event) {
if (event.getPropertyName().equals(ButtonModel.SELECTED_PROPERTY))
handleSelectionChanged();
}
});
add(checkbox);
Label lbl = new Label(ConvertUtil.cleanDbNameFull(text), image);
lbl.setTextPlacement(PositionConstants.WEST);
add(lbl);
}
示例5: FieldFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
public FieldFigure(Field field) {
this.model = field;
this.component = ConfigManager.getComponentByGroupAndType(
ConfigManager.COMPONENT_TYPE_FIELD, field.getType());
setLayoutManager(new FlowLayout());
setForegroundColor(ColorConstants.blue);
setBackgroundColor(ColorConstants.blue);
setBorder(new FieldBorder(field.getDisplayName()));
setOpaque(true);
SimpleLabel sl = new SimpleLabel();
sl.setIcon(getImageByType());
add(sl, ToolbarLayout.ALIGN_CENTER);
placeHolder = ConfigManager.getPlaceHolderValue(component);
int iWidth = 200 * placeHolder + 1;
setSize(iWidth, 22);
}
示例6: GroupMatchFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public GroupMatchFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
createContents();
}
示例7: GroupFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public GroupFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
createContents();
}
示例8: TeamFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public TeamFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
createContents();
}
示例9: EliminationMatchFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public EliminationMatchFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
createContents();
}
示例10: initTitleBar
import org.eclipse.draw2d.FlowLayout; //导入依赖的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);
}
示例11: initTitleBar
import org.eclipse.draw2d.FlowLayout; //导入依赖的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);
}
示例12: InputFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
public InputFigure() {
setLayoutManager(new FlowLayout());
paramDescriptionLabel = new Label("参数名:");
add(paramDescriptionLabel);
TextFieldFigure text = new TextFieldFigure("test",0);
add(text);
}
示例13: showIconView
import org.eclipse.draw2d.FlowLayout; //导入依赖的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();
}
示例14: OperatorFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public OperatorFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
this.setLineWidth(3);
this.setForegroundColor(THIS_FORE);
this.setBackgroundColor(THIS_BACK);
this.setBorder(
new MarginBorder(
getMapMode().DPtoLP(10),
getMapMode().DPtoLP(10),
getMapMode().DPtoLP(10),
getMapMode().DPtoLP(10)));
createContents();
}
示例15: ModelFigure
import org.eclipse.draw2d.FlowLayout; //导入依赖的package包/类
/**
* @generated
*/
public ModelFigure() {
FlowLayout layoutThis = new FlowLayout();
layoutThis.setStretchMinorAxis(false);
layoutThis.setMinorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorAlignment(FlowLayout.ALIGN_LEFTTOP);
layoutThis.setMajorSpacing(5);
layoutThis.setMinorSpacing(5);
layoutThis.setHorizontal(true);
this.setLayoutManager(layoutThis);
this.setLineWidth(3);
this.setForegroundColor(THIS_FORE);
this.setBackgroundColor(THIS_BACK);
this.setMinimumSize(new Dimension(getMapMode().DPtoLP(0), getMapMode().DPtoLP(60)));
this.setBorder(
new MarginBorder(
getMapMode().DPtoLP(7),
getMapMode().DPtoLP(7),
getMapMode().DPtoLP(7),
getMapMode().DPtoLP(7)));
createContents();
}