本文整理汇总了Java中org.eclipse.draw2d.FlowLayout.setMajorAlignment方法的典型用法代码示例。如果您正苦于以下问题:Java FlowLayout.setMajorAlignment方法的具体用法?Java FlowLayout.setMajorAlignment怎么用?Java FlowLayout.setMajorAlignment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.draw2d.FlowLayout
的用法示例。
在下文中一共展示了FlowLayout.setMajorAlignment方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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();
}
示例2: 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();
}
示例3: 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();
}
示例4: 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();
}
示例5: 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();
}
示例6: 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();
}
示例7: 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();
}
示例8: ModelElementReferenceFigure
import org.eclipse.draw2d.FlowLayout; //导入方法依赖的package包/类
/**
* @generated
*/
public ModelElementReferenceFigure() {
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.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7),
getMapMode().DPtoLP(7)));
createContents();
}
示例9: MappingReferenceFigure
import org.eclipse.draw2d.FlowLayout; //导入方法依赖的package包/类
/**
* @generated
*/
public MappingReferenceFigure() {
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.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12)));
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();
}
示例10: ModelElementReferenceSuperFigure
import org.eclipse.draw2d.FlowLayout; //导入方法依赖的package包/类
/**
* @generated
*/
public ModelElementReferenceSuperFigure() {
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.setLineStyle(Graphics.LINE_DASH);
this.setForegroundColor(THIS_FORE);
this.setBackgroundColor(THIS_BACK);
this.setBorder(new MarginBorder(getMapMode().DPtoLP(7), getMapMode().DPtoLP(7), getMapMode().DPtoLP(7),
getMapMode().DPtoLP(7)));
createContents();
}
示例11: MappingReferenceSuperFigure
import org.eclipse.draw2d.FlowLayout; //导入方法依赖的package包/类
/**
* @generated
*/
public MappingReferenceSuperFigure() {
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.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12)));
this.setLineWidth(3);
this.setLineStyle(Graphics.LINE_DASH);
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();
}
示例12: ModelRelFigure
import org.eclipse.draw2d.FlowLayout; //导入方法依赖的package包/类
/**
* @generated
*/
public ModelRelFigure() {
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.setCornerDimensions(new Dimension(getMapMode().DPtoLP(12), getMapMode().DPtoLP(12)));
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();
}
示例13: ensurePositionExists
import org.eclipse.draw2d.FlowLayout; //导入方法依赖的package包/类
private void ensurePositionExists(final IHierarchicalPosition position)
{
// retrieve the position's section
final DiagramSection section = position.section();
// retrieve the position's column
final int column = position.column();
// retrieve the position's parent
final IHierarchicalPosition parent = position.parent();
// retrieve the container figure associated with this position
final IFigure containerFigure;
if (parent != null)
{
// make sure the parent figure exists
ensurePositionExists(parent);
// the container is the bottom part of the parent figure's container
containerFigure = (IFigure) positionToFigure().get(parent).getParent().getChildren().get(1);
}
else
{
// the container is the section figure
containerFigure = (section == DiagramSection.DS_REACHABLE ? sectionReachable()
: section == DiagramSection.DS_UNREACHABLE ? sectionUnreachable() : sectionSingletons());
}
// make sure the container figure has enough column figures
while (column >= containerFigure.getChildren().size())
{
final IFigure columnFigure = new Figure();
// columnFigure.setBorder(new LineBorder(1));
final FlowLayout columnLayout = new FlowLayout(false); // vertical orientation
columnLayout.setMinorSpacing(20);
columnLayout.setStretchMinorAxis(true); // all layers have same height
columnFigure.setLayoutManager(columnLayout);
containerFigure.add(columnFigure);
// top part, where the contour goes-- child @0
final IFigure topFigure = new Figure();
// topFigure.setBorder(new LineBorder(1));
final FlowLayout topLayout = new FlowLayout(true); // horizontal orientation
topLayout.setMinorSpacing(20);
topLayout.setMajorAlignment(OrderedLayout.ALIGN_CENTER); // center w.r.t. parent
topFigure.setLayoutManager(topLayout);
columnFigure.add(topFigure);
// bottom part, where the subgraph goes-- child @1
final IFigure bottomFigure = new Figure();
// bottomFigure.setBorder(new LineBorder(1));
final FlowLayout bottomLayout = new FlowLayout(true); // horizontal orientation
bottomLayout.setMinorSpacing(20);
bottomLayout.setMajorAlignment(OrderedLayout.ALIGN_CENTER); // center w.r.t. parent
bottomFigure.setLayoutManager(bottomLayout);
columnFigure.add(bottomFigure);
}
// container --> column --> top figure
final IFigure cellFigure = (IFigure) ((IFigure) containerFigure.getChildren().get(column))
.getChildren().get(0);
// make sure the cell figure exists in the map
positionToFigure().put(position, cellFigure);
}