Пример #1
0
 public Component getListCellRendererComponent(
     JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
   assert (value instanceof Node);
   Node node = (Node) value;
   String html =
       "<html><b>"
           + StringUtils.humanizeName(node.getName())
           + "</b> &ndash; "
           + node.getDescription()
           + "<br><font color=#333333>"
           + node.getDataClass().getSimpleName()
           + " &mdash;</font> <font color=#666666>"
           + node.getLibrary().getName()
           + "</font></html>";
   setText(html);
   if (isSelected) {
     setBackground(Theme.NODE_SELECTION_ACTIVE_BACKGROUND_COLOR);
   } else {
     setBackground(Theme.NODE_SELECTION_BACKGROUND_COLOR);
   }
   setEnabled(list.isEnabled());
   setFont(list.getFont());
   setIcon(new ImageIcon(NodeView.getImageForNode(node)));
   setBorder(Theme.BOTTOM_BORDER);
   setOpaque(true);
   return this;
 }
Пример #2
0
 /**
  * This should be a task of MindMapLayout start,end must be initialized...
  *
  * @param target TODO
  */
 public void paint(NodeView target, Graphics2D g) {
   this.source = target.getVisibleParentView();
   this.target = target;
   createEnd();
   createStart();
   paint(g);
   this.source = null;
   this.target = null;
 }
Пример #3
0
 protected void createStart() {
   start = source.getMainViewOutPoint(getTarget(), end);
   Tools.convertPointToAncestor(source.getMainView(), start, source);
 }