public AbstractNodeFigure(AbstractNodeElement node,Image icon){ this.node=node; BorderLayout layout=new BorderLayout(); this.setLayoutManager(layout); ImageFigure iconFigure=new ImageFigure(icon); this.add(iconFigure,BorderLayout.LEFT); this.label=new Label(this.node.getLabel()); this.label.setForegroundColor(ColorConstants.black); this.add(this.label,BorderLayout.CENTER); this.setAntialias(SWT.ON); RGB rgb=Activator.getPreference().getBorderColor(); this.setForegroundColor(new Color(null,rgb.red,rgb.green,rgb.blue)); rgb=Activator.getPreference().getBackgroundColor(); this.setBackgroundColor(new Color(null,rgb.red,rgb.green,rgb.blue)); this.setLineWidth(2); }
private static Figure createContents() { Figure contents = new Figure(); XYLayout layout = new XYLayout(); contents.setLayoutManager(layout); Button button = new Button("Hello World"); layout.setConstraint(button, new Rectangle(0, 0, -1, -1)); contents.add(button); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent actionevent) { setBrightness(); } }); String path = "C:\\Users\\Public\\Pictures\\Sample Pictures\\Oryx Antelope.jpg"; image = new Image(Display.getDefault(), path); imageFigure = new ImageFigure(image); layout.setConstraint(imageFigure, new Rectangle(0, 30, -1, -1)); contents.add(imageFigure); return contents; }
public ServerObjectFigure(ServerObject so, Font font) { ToolbarLayout layout = new ToolbarLayout(); setLayoutManager(layout); setOpaque(false); add(new ImageFigure(Images.scouter_48)); Label title = new Label(so.getDisplayName(), null); add(title); StringBuffer sb = new StringBuffer(); sb.append(ScouterUtil.humanReadableByteCount(so.getUsedMemory(), true)); sb.append(" / "); sb.append(ScouterUtil.humanReadableByteCount(so.getTotalMemory(), true)); Label memory = new Label(sb.toString(), null); memory.setFont(font); add(memory); setSize(-1, -1); }
@Override public void addColumnGroup(GroupColumnFigure columnFigure, int viewMode, String name, boolean isAdded, boolean isUpdated, boolean isRemoved) { columnFigure.setBorder(new MarginBorder(new Insets(1, 0, 1, 0))); final ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(0, 4, 0, 7))); image.setImage(Activator.getImage(ImageKey.GROUP)); columnFigure.add(image); final StringBuilder text = new StringBuilder(); text.append(name); text.append(" (GROUP)"); setColumnFigureColor(columnFigure, false, false, isAdded, isUpdated, isRemoved); final Label label = createColumnLabel(); label.setForegroundColor(ColorConstants.black); label.setLabelAlignment(PositionConstants.RIGHT); label.setBorder(new MarginBorder(new Insets(1, 3, 0, 4))); label.setText(text.toString()); columnFigure.add(label); }
@Override public void addIndex(IndexFigure indexFigure, String name, boolean isFirst) { final ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(0, 0, 0, 19))); image.setImage(Activator.getImage(ImageKey.BLANK_WHITE)); image.setOpaque(true); indexFigure.add(image); final StringBuilder text = new StringBuilder(); text.append(name); final Label label = createColumnLabel(); label.setBorder(new MarginBorder(new Insets(1, 0, 0, 4))); label.setForegroundColor(ColorConstants.black); label.setText(text.toString()); indexFigure.add(label); }
public IFigure createFigure( ExtendedItemHandle handle ) { switch( extensionType ) { case FIGURE_EXTENSION_TYPE: return figureExtension.createFigure(handle); case IMAGE_EXTENSION_TYPE: return new ImageFigure(imageExtension.getImage( handle )); case LABEL_EXTENSION_TYPE: return new Label(labelExtension.getLabel( handle )); default: return null; } }
public void updateFigure( ExtendedItemHandle handle, IFigure figure ) { switch( extensionType ) { case FIGURE_EXTENSION_TYPE: figureExtension.updateFigure(handle, figure); break; case IMAGE_EXTENSION_TYPE: ImageFigure imageFigure = (ImageFigure)figure; Image newImage = imageExtension.getImage( handle ); Image oldImage = imageFigure.getImage(); if ( newImage != oldImage ) { imageFigure.setImage(newImage); imageExtension.disposeImage( handle, oldImage ); } break; case LABEL_EXTENSION_TYPE: ((Label)figure).setText(labelExtension.getLabel( handle )); break; } }
public void disposeFigure( ExtendedItemHandle handle, IFigure figure ) { switch( extensionType ) { case FIGURE_EXTENSION_TYPE: figureExtension.disposeFigure(handle, figure); break; case IMAGE_EXTENSION_TYPE: imageExtension.disposeImage( handle, ((ImageFigure)figure).getImage() ); break; case LABEL_EXTENSION_TYPE: // no action needed break; } }
/** * {@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); }
private void CreateContainer() { FKImage = new ImageFigure(); FKImage.setBounds(new Rectangle(this.bounds.x,this.bounds.y,80,20)); FKImage.setBorder(new MarginBorder(new Insets(5, 2, 5, 2))); // FKImage.setImage(null); Rectangle tempRect=new Rectangle(); Point loc=this.getLocation(); Dimension dim=new Dimension(16,16); tempRect.setBounds(loc,dim); this.add(FKImage,tempRect); label = new Label(); label.setBorder(new MarginBorder(new Insets(3, 5, 3, 5))); label.setLabelAlignment(PositionConstants.LEFT); this.add(label); }
/** * {@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); }
private Label createFigure(final String inTitle) { setOpaque(true); setLayoutManager(new XYLayout()); setBorder(new LineBorder(ColorConstants.black)); setBackgroundColor(GraphicalViewerCreator.BG_COLOR); setSize(RelationsConstants.ITEM_WIDTH, RelationsConstants.ITEM_HEIGHT); final Label outLabel = new Label(inTitle); outLabel.setOpaque(true); outLabel.setBackgroundColor(GraphicalViewerCreator.BG_COLOR); outLabel.setLabelAlignment(PositionConstants.LEFT); add(outLabel); setConstraint(outLabel, new Rectangle(ICON_WIDTH, 0, LABEL_WIDTH, RelationsConstants.ITEM_HEIGHT)); final ImageFigure lImage = new ImageFigure(image); add(lImage); setConstraint(lImage, new Rectangle(-1, -1, ICON_WIDTH, ICON_WIDTH)); return outLabel; }
/** * {@inheritDoc} */ @Override public void initTitleBar(final Figure top) { top.setLayoutManager(new BorderLayout()); final Figure title = new Figure(); top.add(title, BorderLayout.TOP); final FlowLayout titleLayout = new FlowLayout(); titleLayout.setMinorAlignment(OrderedLayout.ALIGN_CENTER); title.setLayoutManager(titleLayout); final ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2))); image.setImage(ERDiagramActivator.getImage(getTableFigure().getImageKey())); title.add(image); nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(new Insets(5, 0, 5, 20))); title.add(nameLabel); final Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(ColorConstants.black); separater.setOpaque(true); top.add(separater, BorderLayout.BOTTOM); }
private static Figure createContents() { final Figure contents = new Figure(); final XYLayout layout = new XYLayout(); contents.setLayoutManager(layout); final Button button = new Button("Hello World"); layout.setConstraint(button, new Rectangle(0, 0, -1, -1)); contents.add(button); button.addActionListener(new ActionListener() { @Override public void actionPerformed(final ActionEvent actionevent) { setBrightness(); } }); final String path = "C:\\Users\\Public\\Pictures\\Sample Pictures\\Oryx Antelope.jpg"; image = new Image(Display.getDefault(), path); imageFigure = new ImageFigure(image); layout.setConstraint(imageFigure, new Rectangle(0, 30, -1, -1)); contents.add(imageFigure); return contents; }
/** * {@inheritDoc} */ @Override public void initTitleBar(Figure top) { top.setLayoutManager(new BorderLayout()); Figure title = new Figure(); top.add(title, BorderLayout.TOP); FlowLayout titleLayout = new FlowLayout(); titleLayout.setMinorAlignment(FlowLayout.ALIGN_CENTER); title.setLayoutManager(titleLayout); ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(5, 10, 5, 2))); image.setImage(ERDiagramActivator.getImage(this.getTableFigure().getImageKey())); 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); }
@Override public void add(IFigure figure, Object constraint, int index) { if (figure instanceof ImageFigure) { if (((ImageFigure) figure).getImage() != null) { imageWidth = ((ImageFigure) figure).getImage().getBounds().width; } } super.add(figure, constraint, index); }
@Override protected IFigure getToolTipFigure(EObject element) { if (element instanceof State) { Diagram diagram = getTooltipDiagramToRender((State) element); if (diagram != null) { Image renderImage = renderImage(diagram); return new ImageFigure(renderImage); } } return null; }
public DummyObjectFigure(DummyObject dummy) { ToolbarLayout layout = new ToolbarLayout(); setLayoutManager(layout); setOpaque(false); add(new ImageFigure(Images.folder_48)); Label title = new Label(dummy.getDisplayName(), null); add(title); setSize(-1, -1); }
/** Create buttons enumerated in <code>ZoomType</code> * @param flags Bitwise 'or' of flags * @see XYGraphFlags#COMBINED_ZOOM * @see XYGraphFlags#SEPARATE_ZOOM */ private void createZoomButtons(final int flags) { for(final ZoomType zoomType : ZoomType.values()){ if (! zoomType.useWithFlags(flags)) continue; final ImageFigure imageFigure = new ImageFigure(zoomType.getIconImage()); final Label tip = new Label(zoomType.getDescription()); final ToggleButton button = new ToggleButton(imageFigure); button.setBackgroundColor(ColorConstants.button); button.setOpaque(true); final ToggleModel model = new ToggleModel(); model.addChangeListener(new ChangeListener(){ public void handleStateChanged(ChangeEvent event) { if(event.getPropertyName().equals("selected") && button.isSelected()){ xyGraph.setZoomType(zoomType); } } }); button.setModel(model); button.setToolTip(tip); addButton(button); zoomGroup.add(model); if(zoomType == ZoomType.NONE) zoomGroup.setDefault(model); } }
@Override public void setEnabled(boolean value) { super.setEnabled(value); if(value) setContents(new ImageFigure(image)); else setContents(new ImageFigure(grayImage)); }
@Override public void initTitleBar(Figure top) { top.setLayoutManager(new BorderLayout()); final FlowLayout layout = new FlowLayout(); layout.setStretchMinorAxis(true); final Figure title = new Figure(); top.add(title, BorderLayout.TOP); title.setLayoutManager(layout); title.setBorder(new MarginBorder(new Insets(2, 2, 2, 2))); final ImageFigure image = new ImageFigure(); image.setBorder(new MarginBorder(new Insets(0, 0, 0, 0))); image.setImage(Activator.getImage(getTableFigure().getImageKey())); title.add(image); this.nameLabel = new Label(); nameLabel.setBorder(new MarginBorder(new Insets(0, 0, 0, 20))); title.add(nameLabel); final Figure separater = new Figure(); separater.setSize(-1, 1); separater.setBackgroundColor(ColorConstants.black); separater.setOpaque(true); top.add(separater, BorderLayout.BOTTOM); }
public PinFigure() { super(new ImageFigure(InternalImages.get(InternalImages.IMG_UNPINNED))); setRolloverEnabled(true); setRequestFocusEnabled(false); Label tooltip = new Label(PaletteMessages.TOOLTIP_PIN_FIGURE); tooltip.setBorder(TOOLTIP_BORDER); setToolTip(tooltip); setOpaque(false); addChangeListener(new ChangeListener() { public void handleStateChanged(ChangeEvent e) { if (e.getPropertyName().equals(ButtonModel.SELECTED_PROPERTY)) { if (isSelected()) { ((ImageFigure) (getChildren().get(0))) .setImage(InternalImages .get(InternalImages.IMG_PINNED)); ((Label) getToolTip()) .setText(PaletteMessages.TOOLTIP_UNPIN_FIGURE); } else { ((ImageFigure) (getChildren().get(0))) .setImage(InternalImages .get(InternalImages.IMG_UNPINNED)); ((Label) getToolTip()) .setText(PaletteMessages.TOOLTIP_PIN_FIGURE); } } } }); }
@Override protected void createChildFigures() { mImageFigure = new ImageFigure(); mImageFigure.setBorder(new DashedLineBorder()); add(mImageFigure); }
private IFigure createImage(String chartType) { ImageFigure imageFigure = new ImageFigure(); if (CommonEclipseUtil.getImage("icons/chart/" + chartType + ".jpg").createImage() != null) { imageFigure.setImage(CommonEclipseUtil.getImage("icons/chart/" + chartType + ".jpg") .createImage()); return imageFigure; } else { imageFigure .setImage(CommonEclipseUtil.getImage("icons/chart/column.jpg").createImage()); return imageFigure; } }
public IFigure createTextInput() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/figure/input.png").createImage()); imageFigure.setAlignment(PositionConstants.CENTER); return imageFigure; }
public IFigure createUserTree() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/figure/usertree.png").createImage()); return imageFigure; }
private ElementFigure makeWordFigure(BTSWord word) { TypedLabel label = new TypedLabel(); label.setText(word.getWChar()); label.setType(TypedLabel.TRANSLITATION); final WordFigure rect = new WordFigure(label); rect.setBackgroundColor(colorWordDeselected(word)); rect.setModelObject(word); rect.setType(ElementFigure.WORD); wordMap.put(word.get_id(), rect); // gridLayout = new GridLayout(); // gridLayout.numColumns = 1; // gridLayout.makeColumnsEqualWidth = false; ToolbarLayout tl = new ToolbarLayout(); tl.setHorizontal(false); tl.setSpacing(5); String mdc = transformWordToMdCString(word); if (showHieroglyphs) { ImageFigure imageFigure = new CompartementImageFigure(); // System.out.println("mdc " + mdc); if (mdc != null && !"".equals(mdc) && imageList.size() < MAX_IMAGE_SIZE) { try { Image image = transformToSWT(getImageData(mdc)); // String path = "E:/dev_resources/icons_48/save.png"; //$NON-NLS-1$ // // image = new Image(Display.getDefault(), path); imageFigure.setImage(image); } catch (MDCSyntaxError e) { // TODO Auto-generated catch block e.printStackTrace(); } } else if (mdc != null && !"".equals(mdc)) { rect.setMdc(mdc); } // rect.getAttributesCompartment().add(imageFigure); rect.setImageFigure(imageFigure); rect.add(imageFigure); } if (showLemmaId) { // add lemma key addLKeyToWordFigure(word, rect); } if (showFlexion) { // add flexion code addFCodeToWordFigure(word, rect); } for (int i=0; i<BTSCoreConstants.LANGS.length; i++) { String lang = BTSCoreConstants.LANGS[i]; if ((showTransLangMask>>i & 1) == 1) { addTransToWordFigure(word, rect, lang); } } rect.setSize(90, 290); rect.addMouseListener(elementSelectionListener); rect.setLayoutManager(tl); appendFigure(rect); if (!word.eAdapters().contains(notifier)) { word.eAdapters().add(notifier); } return rect; }
private void refreshFigureFromModel(List<ElementFigure> selectedElementsInternals, BTSWord word) { for (ElementFigure element : selectedElementsInternals) { if (element instanceof WordFigure) { WordFigure wf = (WordFigure) element; Object o = wf.getModelObject(); if (word == null && o instanceof BTSWord) { word = (BTSWord) o; } boolean lset = false; boolean fset = false; for (Object fig : wf.getChildren()) { if (fig instanceof ImageFigure) { ImageFigure imf = (ImageFigure) fig; String mdc = transformWordToMdCString(word); try { if (imf.getImage() != null) if (!imf.getImage().isDisposed()) imf.getImage().dispose(); imf.setImage(transformToSWT(getImageData(mdc))); } catch (MDCSyntaxError e) { // TODO Auto-generated catch block e.printStackTrace(); } } else if (fig instanceof TypedLabel) { TypedLabel l = (TypedLabel) fig; switch (l.getType()) { case TypedLabel.LEMMA : l.setText(word.getLKey()); lset = true; break; case TypedLabel.FLEXION : l.setText(word.getFlexCode()); fset = true; break; case TypedLabel.TRANSLITATION : l.setText(word.getWChar()); break; case TypedLabel.TRANSLATION : if (word.getTranslation() != null) { String lang = l.getTranslationLang(); String trans = word.getTranslation().getTranslation(lang); l.setText(lang + ":" + (trans != null ? trans : "")); } break; } } } if (showLemmaId && !lset && word.getLKey() != null && !"".equals(word.getLKey())) { addLKeyToWordFigure(word, wf); } if (showFlexion && !fset && word.getFlexCode() != null && !"".equals(word.getFlexCode())) { addFCodeToWordFigure(word, wf); } //FIXME add hieroglyphs } } }
private void refreshFigureFromModel(IFigure figure, BTSWord word) { if (figure instanceof WordFigure) { WordFigure wf = (WordFigure) figure; Object o = wf.getModelObject(); if (word == null && o instanceof BTSWord) { word = (BTSWord) o; } boolean lset = false; boolean fset = false; for (Object fig : wf.getChildren()) { if (fig instanceof ImageFigure) { ImageFigure imf = (ImageFigure) fig; String mdc = transformWordToMdCString(word); try { if (imf.getImage() != null) if (!imf.getImage().isDisposed()) imf.getImage().dispose(); imf.setImage(transformToSWT(getImageData(mdc))); } catch (MDCSyntaxError e) { // TODO Auto-generated catch block e.printStackTrace(); } } else if (fig instanceof TypedLabel) { TypedLabel l = (TypedLabel) fig; switch (l.getType()) { case TypedLabel.LEMMA : l.setText(word.getLKey()); lset = true; break; case TypedLabel.FLEXION : l.setText(word.getFlexCode()); fset = true; break; case TypedLabel.TRANSLITATION : l.setText(word.getWChar()); break; case TypedLabel.TRANSLATION : if (word.getTranslation() != null) { String lang = l.getTranslationLang(); String trans = word.getTranslation().getTranslationStrict(lang); l.setText(lang + ":" + (trans != null ? trans : "")); } break; } } } if (showLemmaId && !lset && word.getLKey() != null && !"".equals(word.getLKey())) { addLKeyToWordFigure(word, wf); } if (showFlexion && !fset && word.getFlexCode() != null && !"".equals(word.getFlexCode())) { addFCodeToWordFigure(word, wf); } //FIXME add hieroglyphs } }
public ImageFigure getImageFigure() { return imageFigure; }
public IFigure createColumn() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/chart/column.jpg").createImage()); return imageFigure; }
public IFigure createLine() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/chart/line.jpg").createImage()); return imageFigure; }
public IFigure createPie() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/chart/pie.png").createImage()); return imageFigure; }
public IFigure createTree() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/figure/tree.png").createImage()); return imageFigure; }
public IFigure createSelect() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/figure/select.png").createImage()); return imageFigure; }
public IFigure createDate() { ImageFigure imageFigure = new ImageFigure(); imageFigure.setImage(CommonEclipseUtil.getImage("icons/figure/date.png").createImage()); return imageFigure; }
protected void addSpeakerBox() { speakerBox.setBorder(new LineBorder(ColorConstants.black, 1)); speakerBox.setOpaque(true); Image speakerIconImg = getSpeakerIconImage(); // TODO: handle getImage returning null org.eclipse.swt.graphics.Rectangle bds = speakerIconImg.getBounds(); IFigure speakerImgFig = new ImageFigure(speakerIconImg); IFigure speakerImgToolTip = new Label(L10N.get("DEF.SpeakerText", "Speaker text")); speakerImgFig.setToolTip(speakerImgToolTip); speakerImgWidth = bds.width; speakerImgHeight = bds.height; speakerLayout.setConstraint(speakerImgFig, new Rectangle(0, 0, bds.width, bds.height)); speakerBox.add(speakerImgFig); RectangleFigure speakerEastBorder = new RectangleFigure(); speakerEastBorder.setBorder(new LineBorder(ColorConstants.black, 1)); speakerLayout.setConstraint(speakerEastBorder, new Rectangle(speakerImgWidth, 0, SPEAKER_DIVIDER_WIDTH, speakerImgHeight)); speakerBox.add(speakerEastBorder); timeWestBorder = new RectangleFigure(); timeWestBorder.setBorder(new LineBorder(ColorConstants.black, 1)); speakerBox.add(timeWestBorder); String text = frame.getSpeakerText(); speakerText = new Label(text); speakerText.setLabelAlignment(PositionConstants.LEFT); speakerTextToolTip = new Label(text); if ((text != null) && ! text.equals("")) { speakerText.setToolTip(speakerTextToolTip); } speakerBox.add(speakerText); divider = new RectangleFigure(); divider.setBorder(new LineBorder(ColorConstants.black, 1)); speakerBox.add(divider); double listenTimeInSecs = frame.getListenTimeInSecs(); listenTime = new Label((listenTimeInSecs == Frame.NO_LISTEN_TIME) ? NO_LISTEN_TIME_LABEL : Double.toString(listenTimeInSecs)); listenTime.setLabelAlignment(PositionConstants.RIGHT); speakerBox.add(listenTime); Label listenTimeToolTip = new Label(LISTEN_TIME_TOOLTIP); listenTime.setToolTip(listenTimeToolTip); }
/** * Creates a figure to display a small icon on the left side of the name of a feature */ protected void createIconFigure(){ ImageDescriptor descriptor = PlatformUI.getWorkbench().getSharedImages().getImageDescriptor(ISharedImages.IMG_OBJS_ERROR_TSK); iconFigure = new ImageFigure(descriptor.createImage(true)); iconFigure.setBounds(new Rectangle(0, 0, descriptor.getImageData().width, descriptor.getImageData().height)); iconFigure.setVisible(calculateIconVisibility()); add(iconFigure); createTooltipFigure(); }