public Selectedtag(DataEvent eventdata, DataTag tagdata) { this.eventdata = eventdata; this.tagdata = tagdata; label = new JLabel(tagdata.getFullPath()); label.setForeground(View.GREY_DARK); unselect = new Button(" X "); unselect.setVisible(false); setDraggable(true); setMouseoverFg(MOUSEOVER_FG); setMouseoutFg(MOUSEOUT_FG); add(unselect); add(label, new Anchor(unselect, Anchor.RIGHT, Anchor.HORIZONTAL)); }
@Override public void dataUpdated(ViewEvent e) { if (e.getPinnedData() == tagdata) { label.setText(tagdata.getFullPath()); } }