@Override protected void initCellEditor() { Text text = (Text) getCellEditor().getControl(); FrameBorder border = (FrameBorder) this.blockModelFigure.getBorder(); getCellEditor().setValue(border.getLabel()); IFigure figure = ((GraphicalEditPart) getEditPart()).getFigure(); scaledFont = figure.getFont(); FontData data = scaledFont.getFontData()[0]; Dimension fontSize = new Dimension(0, data.getHeight()); data.setHeight(fontSize.height); scaledFont = new Font(null, data); text.setFont(scaledFont); text.selectAll(); }
public TableModelFigure() { ToolbarLayout layout = new ToolbarLayout(); layout.setHorizontal(true); layout.setSpacing(10); layout.setMinorAlignment(ToolbarLayout.ALIGN_TOPLEFT); setLayoutManager(new FillLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder("列表"); border.setLabel("Block"); this.setBorder(border); ScrollPane scrollpane = new ScrollPane(); scrollpane.setHorizontalScrollBarVisibility(1); scrollpane.setVerticalScrollBarVisibility(0); headerFigure = new FreeformLayer(); headerFigure.setLayoutManager(new ScrollAreaLayout()); headerFigure.setBackgroundColor(ColorConstants.white); add(scrollpane); scrollpane.setViewport(new FreeformViewport()); scrollpane.setContents(headerFigure); }
public ChartBlockModelFigure() { setLayoutManager(new GridLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder(); border.setLabel("Block"); this.setBorder(border); gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.grabExcessHorizontalSpace = true; gridData.horizontalAlignment = GridData.BEGINNING; gridData.verticalAlignment = GridData.CENTER; }
public FrameBlockModelFigure() { setLayoutManager(new GridLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder(); border.setLabel("Block"); this.setBorder(border); gridData = new GridData(GridData.FILL_HORIZONTAL); gridData.grabExcessHorizontalSpace = true; gridData.horizontalAlignment = GridData.BEGINNING; gridData.verticalAlignment = GridData.CENTER; getContainer(); }
public HtmlAreaModelFigure() { setLayoutManager(new FillLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder(); border.setLabel("Block"); this.setBorder(border); }
public QueryBlockModelFigure() { setLayoutManager(new QueryBlockModelLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder(); border.setLabel("Block"); this.setBorder(border); }
public DiagramFigure(){ setLayoutManager(new PageXYLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder(); border.setLabel("Block"); this.setBorder(border); }
public PageFigure(){ setLayoutManager(new PageXYLayout()); setOpaque(true); setBackgroundColor(ColorConstants.white); border = new FrameBorder(); border.setLabel("Block"); this.setBorder(border); }
private IFigure createEditorControl() { FrameBorder editor=new FrameBorder("编辑器"); editor.setLabel(controlModel.getName());// TODO Auto-generated method stub this.setBorder(editor); return null; }
private IFigure createTableControl() { FrameBorder table=new FrameBorder("列表"); table.setLabel(controlModel.getName());// TODO Auto-generated method stub this.setBorder(table); ToolbarLayout tool=new ToolbarLayout(); tool.setHorizontal(true); tool.setSpacing(5); this.setLayoutManager(tool); return null; }
public ColumnModelFigure(){ frame=new FrameBorder(); this.setBorder(frame); ToolbarLayout tool=new ToolbarLayout(); tool.setHorizontal(true); tool.setSpacing(5); this.setLayoutManager(tool); }
protected void refreshVisuals() { ControlPageModel node = (ControlPageModel) this.getModel(); ((FrameBorder) getFigure().getBorder()).setLabel(node.getName()); Rectangle rectangle = node.getRectangle(); ((PageFigure) this.getFigure()).setPageModel((ControlPageModel) this.getModel()); ((GraphicalEditPart) getParent()).setLayoutConstraint(this, getFigure(), rectangle); }
public FrameBorder getBorder() { return border; }