Exemplo n.º 1
0
 /** Adds the specified component with the specified name to the layout. */
 public void addLayoutComponent(String name, Component comp) {
   synchronized (comp.getTreeLock()) {
     if ("Grip".equals(name)) { // NOI18N
       grip = comp;
     } else if ("Action".equals(name)) { // NOI18N
       actions.addElement(comp);
     } else
       throw new IllegalArgumentException(
           "cannot add to layout: unknown constraint: " + name); // NOI18N
   }
 }
Exemplo n.º 2
0
 /** Removes the specified component from the layout. */
 public void removeLayoutComponent(Component comp) {
   synchronized (comp.getTreeLock()) {
     if (grip == comp) grip = null;
     else actions.removeElement(comp);
   }
 }