public Component getControls() {
   if (controls == null) {
     Box b = Box.createVerticalBox();
     b.add(new JLabel(Resources.getString("Notes.invisible"))); // $NON-NLS-1$
     text = new TextConfigurer(null, null);
     b.add(text.getControls());
     controls = b;
   }
   return controls;
 }
Example #2
0
  public RoomTree() {
    setRootVisible(false);
    setShowsRootHandles(true);
    root = new DefaultMutableTreeNode(Resources.getString("Chat.server")); // $NON-NLS-1$
    model =
        new DefaultTreeModel(root) {
          private static final long serialVersionUID = 1L;

          public boolean isLeaf(Object node) {
            return ((DefaultMutableTreeNode) node).getUserObject() instanceof Player;
          }
        };
    setModel(model);
    setCellRenderer(new RoomTreeRenderer());
  }