@Override public IFigure getFigure () { return new Label ( "" ); } };
@Override public void setDeskManagedObjectSourceFlowName( String deskManagedObjectSourceFlowName) { this.flowName.setText(deskManagedObjectSourceFlowName); }
public void setNameToolTipText(String toolTip) { if (toolTip.length() > 0) { nameLabel.setToolTip(toolTipLabel); toolTipLabel.setText(toolTip); } else { nameLabel.setToolTip(null); } }
@Override public IFigure getFigure() { // Ensure a figure available if (this.figure == null) { // Provide no figure (if one not configured) Label noFigure = new Label("ERROR: no figure provided"); noFigure.setBackgroundColor(StandardOfficeFloorColours.ERROR()); noFigure.setOpaque(true); noFigure.setLayoutManager(new FlowLayout()); this.figure = noFigure; } // Return the figure return this.figure; }
Label dropHintLabel = new Label(); dropHintLabel.setOpaque(true); dropHintLabel.setBackgroundColor(ColorConstants.tooltipBackground); dropHintLabel.setBorder( new LineBorder(ColorConstants.black, 1) dropHintLabel.setText(hintText); Dimension hintSize = dropHintLabel.getPreferredSize(); Point hintLocation = new Point(mousePosition.x, mousePosition.y+DROP_HINT_VERTICAL_OFFSET); dropHintLabel.translateToRelative(hintRect); dropHintLabel.setBounds(hintRect);
nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(3, 5, 3, 5)); nameLabel.setLabelAlignment(PositionConstants.LEFT); nameLabel.setOpaque(true); rowFigure.add(nameLabel); nameAnnotationLabel = new Label(); nameAnnotationLabel.setBorder(new MarginBorder(3, 5, 3, 5)); nameAnnotationLabel.setLabelAlignment(PositionConstants.LEFT); nameAnnotationLabel.setOpaque(true); rowFigure.add(nameAnnotationLabel); toolTipLabel = new Label(); typeLabel = new Label(); typeLabel.setBorder(new MarginBorder(3, 5, 3, 20)); typeLabel.setLabelAlignment(PositionConstants.LEFT); typeLabel.setOpaque(true); rowFigure.add(typeLabel); typeAnnotationLabel.setBorder(new MarginBorder(3, 5, 3, 5)); typeAnnotationLabel.setLabelAlignment(PositionConstants.LEFT); typeAnnotationLabel.setOpaque(true); rowFigure.add(typeAnnotationLabel);
this.flowName = new Label(); this.flowName.setLayoutManager(new NoSpacingToolbarLayout(true)); this.flowName.setForegroundColor(StandardOfficeFloorColours.BLACK()); figure.add(this.flowName);
protected void refreshVisuals() { XSDSimpleTypeDefinitionAdapter adapter = (XSDSimpleTypeDefinitionAdapter)getModel(); String name = adapter.getDisplayName(); HeadingFigure headingFigure = figure.getHeadingFigure(); headingFigure.setIsReadOnly(adapter.isReadOnly()); Label label = headingFigure.getLabel(); label.setText(name); label.setIcon(XSDCommonUIUtils.getUpdatedImage(adapter.getXSDTypeDefinition(), adapter.getImage(), adapter.isReadOnly())); }
protected void applyCommon ( final Text element ) { super.applyCommon ( element ); this.figure.setTextAlignment ( Helper.convertAlignment ( element.getTextAlignment (), PositionConstants.CENTER ) ); this.figure.setLabelAlignment ( Helper.convertAlignment ( element.getLabelAlignment (), PositionConstants.CENTER ) ); this.figure.setIconAlignment ( Helper.convertAlignment ( element.getIconAlignment (), PositionConstants.CENTER ) ); this.figure.setTextPlacement ( convertOrientation ( element.getTextPlacement (), PositionConstants.EAST ) ); setAlpha ( element.getAlpha () ); setFontFull ( element.getFontName (), element.getFontSize (), element.isFontBold (), element.isFontItalic () ); }
/** * Initiate. * * @param name * Name. * @param colour * {@link Color} of the {@link Figure}. */ public EllipseFigure(String name, Color colour) { // Ellipse this.setBackgroundColor(colour); this.setOpaque(true); this.setLayoutManager(new FlowLayout()); // Provide name this.name = new Label(name); this.name.setLayoutManager(new FlowLayout()); this.name.setBorder(new MarginBorder(5)); this.add(this.name); }
public void refreshVisuals() { XSDBaseAdapter adapter = (XSDBaseAdapter) getModel(); if (adapter != null) { isReadOnly = adapter.isReadOnly(); label.setForegroundColor(computeLabelColor()); label.setText(adapter.getText()); Image image = adapter.getImage(); if (image != null) { label.setIcon(XSDCommonUIUtils.getUpdatedImage((XSDConcreteComponent) adapter.getTarget(), image, isReadOnly)); } // arrowLabel.setVisible(Boolean.TRUE.equals(adapter.getProperty(getModel(), // "drillDown"))); } else { label.setText(Messages._UI_GRAPH_UNKNOWN_OBJECT + getModel().getClass().getName()); // arrowLabel.setVisible(false); } if (reselect) { getViewer().select(this); setReselect(false); } }
this.containerName = new Label(containerName); this.containerName.setLayoutManager(new NoSpacingToolbarLayout(true)); header.add(this.containerName);
protected IFigure createFigure() { Figure typeGroup = new Figure(); typeGroup.setLayoutManager(new ToolbarLayout()); labelHolder = new Figure(); FillLayout fillLayout = new FillLayout(); labelHolder.setLayoutManager(fillLayout); typeGroup.add(labelHolder); label = new HyperLinkLabel(); label.setOpaque(true); label.setBorder(new MarginBorder(0, 2, 2, 1)); label.setForegroundColor(ColorConstants.black); labelHolder.add(label); return typeGroup; }
public void setNameAnnotationLabelIcon(Image icon) { nameAnnotationLabel.setIcon(icon); }
protected void initCellEditor() String initialLabelText = label.getText(); combo.setFont(label.getFont()); combo.setForeground(label.getForegroundColor()); combo.setBackground(label.getBackgroundColor()); combo.setVisibleItemCount(20);
scaledFont = label.getFont(); Color color = label.getBackgroundColor(); text.setBackground(color); String initialLabelText = label.getText(); getCellEditor().setValue(initialLabelText); scaledFont = label.getParent().getFont(); text.setBackground(label.getParent().getBackgroundColor()); label.getParent().translateToAbsolute(fontSize); data.setHeight(fontSize.height); scaledFont = new Font(null, data);
public void setLabelAlignment ( final String value ) { this.figure.setLabelAlignment ( Helper.convertPosition ( value, PositionConstants.CENTER ) ); }
scaledFont = label.getFont(); Color color = label.getBackgroundColor(); text.setBackground(color); scaledFont = label.getParent().getFont(); text.setBackground(label.getParent().getBackgroundColor()); label.getParent().translateToAbsolute(fontSize); data.setHeight(fontSize.height); scaledFont = new Font(null, data);