Ejemplo n.º 1
0
 public int getIndexOfChild(Object parent, Object child) {
   if (parent.equals(d_root)) {
     return d_domain.getCategories().indexOf(child);
   } else {
     ObservableList<? extends Entity> contents =
         d_domain.getCategoryContents(getCategoryNode(parent));
     if (contents != null) {
       return contents.indexOf(child);
     }
   }
   return -1;
 }
Ejemplo n.º 2
0
 public int getChildCount(Object parent) {
   if (d_root.equals(parent)) {
     return d_domain.getCategories().size();
   } else {
     ObservableList<? extends Entity> contents =
         d_domain.getCategoryContents(getCategoryNode(parent));
     if (contents != null) {
       return contents.size();
     }
   }
   return 0;
 }
Ejemplo n.º 3
0
 public ExampleBean() {
   booleanValue = true;
   color = Color.WHITE;
   date = new GregorianCalendar(1967, 11, 5).getTime().getTime();
   floatValue = 0.5f;
   intChoice = LEFT_INTEGER.intValue();
   intLimited = 15;
   intValue = 42;
   longValue = 42L;
   objectChoice = LEFT;
   text = "Text";
   listModel = new ArrayListModel();
   listModel.addAll(Album.ALBUMS);
   listSelection = listModel.get(0);
 }
Ejemplo n.º 4
0
 public NotesView(ObservableList<Note> notes, boolean editable) {
   super(new BorderLayout());
   d_notes = notes;
   d_editable = editable;
   add(buildPanel(), BorderLayout.CENTER);
   d_notes.addListDataListener(new NotesListener());
 }