Revision 3592 branches/gvSIG_WMSv2/extensions/extWMS/src/com/iver/cit/gvsig/gui/panels/StyleTree.java

View differences:

StyleTree.java
43 43
*
44 44
* $Id$
45 45
* $Log$
46
* Revision 1.1.2.5  2006-01-10 11:33:31  jaume
46
* Revision 1.1.2.6  2006-01-11 12:20:30  jaume
47
* *** empty log message ***
48
*
49
* Revision 1.1.2.5  2006/01/10 11:33:31  jaume
47 50
* Time dimension working against Jet Propulsion Laboratory's WMS server
48 51
*
49 52
* Revision 1.1.2.4  2006/01/09 18:10:38  jaume
......
115 118
    private void initialize(){
116 119
        setToggleClickCount(1);
117 120
        setRowHeight(22);
121
        
118 122
        setCellRenderer(new TreeCellRenderer() {
119 123
            public Component getTreeCellRendererComponent(JTree tree, Object value, boolean selected, boolean expanded, boolean leaf, int row, boolean hasFocus) {
120 124
                if (leaf) {
......
162 166
     * @param styleNames, Vector containing the style names. 
163 167
     * The styles order <b>must match</b> with the layer order. 
164 168
     */
165
    public void setStylesSelection(Vector styleNames){
169
    public void setSelections(Vector styleNames){
166 170
        
167 171
        StylesTreeModel model = (StylesTreeModel) getModel();
168 172
        if (model.getChildCount(model.getRoot())!=styleNames.size()){
......
309 313
    /**
310 314
     * Adds a new branch to this tree. It must be a layer node.
311 315
     * @param node
316
     * @return <b>True</b>, if the added branch actually defines any style.
317
     *         <b>False</b>, if the layer has no styles.
312 318
     */
313
    public void addLayerBranch(WMSLayerNode node){
319
    public boolean addLayerBranch(WMSLayerNode node){
320
        if (node.getStyles()==null || node.getStyles().size()==0){
321
            return false;
322
        }
314 323
        WMSLayerNode myNode = (WMSLayerNode) node.clone();
315 324
        myNode.setParent((WMSLayerNode) getRoot());
316 325
        ((WMSLayerNode)getRoot()).getChildren().add(myNode);
326
        return true;
317 327
    }
318 328

  
319 329

  

Also available in: Unified diff