当前位置: 首页>>代码示例>>Java>>正文


Java FlowLayout类代码示例

本文整理汇总了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;
}
 
开发者ID:eclipse,项目名称:gemoc-studio,代码行数:20,代码来源:BranchEditPart.java

示例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);
		}
	});
}
 
开发者ID:andre-santos-pt,项目名称:pandionj,代码行数:18,代码来源:ObjectFigure.java

示例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();
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:23,代码来源:StateEditPart.java

示例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);
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:24,代码来源:ColumnFigure.java

示例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);
}
 
开发者ID:snakerflow,项目名称:snaker-designer,代码行数:19,代码来源:FieldFigure.java

示例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();
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:19,代码来源:GroupMatchEditPart.java

示例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();
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:19,代码来源:GroupEditPart.java

示例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();
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:19,代码来源:TeamEditPart.java

示例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();
}
 
开发者ID:ggxx,项目名称:HelloBrazil,代码行数:19,代码来源:EliminationMatchEditPart.java

示例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);
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:28,代码来源:ViewModelFigure.java

示例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);
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:27,代码来源:TableModelFigure.java

示例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);
}
 
开发者ID:winture,项目名称:wt-studio,代码行数:8,代码来源:InputFigure.java

示例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();
}
 
开发者ID:Polyglotter,项目名称:chrysalix,代码行数:25,代码来源:FocusTreeCanvas.java

示例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();
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:28,代码来源:OperatorEditPart.java

示例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();
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:29,代码来源:ModelEditPart.java


注:本文中的org.eclipse.draw2d.FlowLayout类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。