Exemple #1
0
 /**
  * Constructor.
  *
  * @param root root node
  * @param w window reference
  */
 public BaseXTree(final DefaultMutableTreeNode root, final Window w) {
   super(root);
   BaseXLayout.addInteraction(this, w);
   setLargeModel(true);
   addMouseListener(
       new MouseAdapter() {
         @Override
         public void mousePressed(final MouseEvent e) {
           if (!e.isShiftDown()) setSelectionRow(getClosestRowForLocation(e.getX(), e.getY()));
         }
       });
 }
Exemple #2
0
 /**
  * Sets the label borders.
  *
  * @param t top distance
  * @param l left distance
  * @param b bottom distance
  * @param r right distance
  * @return self reference
  */
 public final BaseXTree border(final int t, final int l, final int b, final int r) {
   setBorder(BaseXLayout.border(t, l, b, r));
   return this;
 }