예제 #1
0
  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));
  }
예제 #2
0
 @Override
 public void dataUpdated(ViewEvent e) {
   if (e.getPinnedData() == tagdata) {
     label.setText(tagdata.getFullPath());
   }
 }
예제 #3
0
 @Override
 public String getDragText() {
   return tagdata.getPath();
 }