[Bprocessor-commit] gui/src/net/sourceforge/bprocessor/gui/treeview GenericTreeView.java, 1.76, 1.7
Status: Pre-Alpha
Brought to you by:
henryml
|
From: rimestad <rim...@us...> - 2007-03-08 10:05:02
|
Update of /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv1466/src/net/sourceforge/bprocessor/gui/treeview Modified Files: GenericTreeView.java Log Message: added icons in stead of lines Index: GenericTreeView.java =================================================================== RCS file: /cvsroot/bprocessor/gui/src/net/sourceforge/bprocessor/gui/treeview/GenericTreeView.java,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** GenericTreeView.java 7 Mar 2007 10:37:13 -0000 1.76 --- GenericTreeView.java 8 Mar 2007 10:04:15 -0000 1.77 *************** *** 113,116 **** --- 113,122 ---- protected static ImageIcon constructorgroupicon; + /** Shown icon */ + protected static ImageIcon shownicon; + + /** hidden icon */ + protected static ImageIcon hiddenicon; + static { spacegroupicon = loadIcon("Biconspacegroup.gif"); *************** *** 126,129 **** --- 132,137 ---- constructionspaceicon = loadIcon("Biconconspace.gif"); functionalspaceicon = loadIcon("Biconspace.gif"); + shownicon = loadIcon("Beyeopen.gif"); + hiddenicon = loadIcon("Beyeclosed.gif"); } *************** *** 169,173 **** private static final long serialVersionUID = 1L; ! private boolean shown; /** * Constructor --- 177,181 ---- private static final long serialVersionUID = 1L; ! private int shown; /** * Constructor *************** *** 184,188 **** Dimension d1 = super.getPreferredSize(); if (d1 != null) { ! return new Dimension(d1.width + 15, d1.height); } else { return null; --- 192,196 ---- Dimension d1 = super.getPreferredSize(); if (d1 != null) { ! return new Dimension(d1.width + 20, d1.height); } else { return null; *************** *** 197,202 **** Dimension d = getPreferredSize(); // will be icon later ! if (!shown) { ! g.drawLine(0, 0, d.width, d.height); } } --- 205,216 ---- Dimension d = getPreferredSize(); // will be icon later ! if (shown == 0) { ! // hidden ! hiddenicon.paintIcon(this, g, d.width - 16, 0); ! } else if (shown == 1) { ! // shown ! shownicon.paintIcon(this, g, d.width - 16, 0); ! } else { ! // not defined } } *************** *** 234,241 **** Camera c = Project.getInstance().getCurrentCamera(); if (c.getHiddenGeometrics().contains(node.getUserObject())) { ! shown = false; } else { ! shown = true; } } } --- 248,257 ---- Camera c = Project.getInstance().getCurrentCamera(); if (c.getHiddenGeometrics().contains(node.getUserObject())) { ! shown = 0; } else { ! shown = 1; } + } else { + shown = -1; } } |