Revision 9708

View differences:

trunk/frameworks/_fwAndami/src/com/iver/andami/ui/mdiFrame/MDIFrame.java
280 280

  
281 281
		if (jtb == null) {
282 282
			jtb = new SelectableToolBar(toolBar.getName());
283
			if (toolBar.getName().equals("core"))
284
				System.out.println("Is visible: "+toolBar.getIsVisible());
283 285
			jtb.setRollover(true);
286
			jtb.setVisible(toolBar.getIsVisible());
284 287
			toolBarMap.put(name, jtb);
285 288
			toolBars.add(jtb);
286 289

  
......
355 358

  
356 359
		if (jtb == null) {
357 360
			jtb = new SelectableToolBar(toolBar.getName());
361
			if (toolBar.getName().equals("core"))
362
				System.out.println("Is visible: "+toolBar.getIsVisible());
358 363
			jtb.setRollover(true);
364
			jtb.setVisible(toolBar.getIsVisible());
359 365
			toolBarMap.put(name, jtb);
360 366
			toolBars.add(jtb);
361 367
		}
......
934 940

  
935 941
			if (todosOcultos) {
936 942
				t.setVisible(false);
937
			} else {
938
				t.setVisible(true);
939 943
			}
944
			// don't set the toolbar as visible, it has been already set as
945
			// visible (or not visible) from config.xml
946
			//else {
947
			//	t.setVisible(true);
948
			//}
940 949
		}
941 950

  
942 951
		if (mdiManager != null) {
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ToolBarDescriptor.java
143 143
            fieldValidator.setValidator(typeValidator);
144 144
        }
145 145
        desc.setValidator(fieldValidator);
146
        //-- _visible
147
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_visible", "visible", org.exolab.castor.xml.NodeType.Attribute);
146
        //-- _isVisible
147
        desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(java.lang.Boolean.TYPE, "_isVisible", "is-visible", org.exolab.castor.xml.NodeType.Attribute);
148 148
        handler = (new org.exolab.castor.xml.XMLFieldHandler() {
149 149
            public java.lang.Object getValue( java.lang.Object object ) 
150 150
                throws IllegalStateException
151 151
            {
152 152
                ToolBar target = (ToolBar) object;
153
                if(!target.hasVisible())
153
                if(!target.hasIsVisible())
154 154
                    return null;
155
                return (target.getVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
155
                return (target.getIsVisible() ? java.lang.Boolean.TRUE : java.lang.Boolean.FALSE);
156 156
            }
157 157
            public void setValue( java.lang.Object object, java.lang.Object value) 
158 158
                throws IllegalStateException, IllegalArgumentException
......
161 161
                    ToolBar target = (ToolBar) object;
162 162
                    // if null, use delete method for optional primitives 
163 163
                    if (value == null) {
164
                        target.deleteVisible();
164
                        target.deleteIsVisible();
165 165
                        return;
166 166
                    }
167
                    target.setVisible( ((java.lang.Boolean)value).booleanValue());
167
                    target.setIsVisible( ((java.lang.Boolean)value).booleanValue());
168 168
                }
169 169
                catch (java.lang.Exception ex) {
170 170
                    throw new IllegalStateException(ex.toString());
......
177 177
        desc.setHandler(handler);
178 178
        addFieldDescriptor(desc);
179 179
        
180
        //-- validation code for: _visible
180
        //-- validation code for: _isVisible
181 181
        fieldValidator = new org.exolab.castor.xml.FieldValidator();
182 182
        { //-- local scope
183 183
            BooleanValidator typeValidator = new BooleanValidator();
trunk/frameworks/_fwAndami/src/com/iver/andami/plugins/config/generate/ToolBar.java
51 51
    private boolean _has_position;
52 52

  
53 53
    /**
54
     * Field _visible
54
     * Field _isVisible
55 55
     */
56
    private boolean _visible = true;
56
    private boolean _isVisible = true;
57 57

  
58 58
    /**
59
     * keeps track of state for field: _visible
59
     * keeps track of state for field: _isVisible
60 60
     */
61
    private boolean _has_visible;
61
    private boolean _has_isVisible;
62 62

  
63 63
    /**
64 64
     * Field _actionToolList
......
191 191
    } //-- void addSelectableTool(int, com.iver.andami.plugins.config.generate.SelectableTool) 
192 192

  
193 193
    /**
194
     * Method deleteIsVisible
195
     */
196
    public void deleteIsVisible()
197
    {
198
        this._has_isVisible= false;
199
    } //-- void deleteIsVisible() 
200

  
201
    /**
194 202
     * Method deletePosition
195 203
     */
196 204
    public void deletePosition()
......
199 207
    } //-- void deletePosition() 
200 208

  
201 209
    /**
202
     * Method deleteVisible
203
     */
204
    public void deleteVisible()
205
    {
206
        this._has_visible= false;
207
    } //-- void deleteVisible() 
208

  
209
    /**
210 210
     * Method enumerateActionTool
211 211
     */
212 212
    public java.util.Enumeration enumerateActionTool()
......
350 350
    } //-- int getComboScaleCount() 
351 351

  
352 352
    /**
353
     * Returns the value of field 'isVisible'.
354
     * 
355
     * @return the value of field 'isVisible'.
356
     */
357
    public boolean getIsVisible()
358
    {
359
        return this._isVisible;
360
    } //-- boolean getIsVisible() 
361

  
362
    /**
353 363
     * Returns the value of field 'name'.
354 364
     * 
355 365
     * @return the value of field 'name'.
......
407 417
    } //-- int getSelectableToolCount() 
408 418

  
409 419
    /**
410
     * Returns the value of field 'visible'.
411
     * 
412
     * @return the value of field 'visible'.
420
     * Method hasIsVisible
413 421
     */
414
    public boolean getVisible()
422
    public boolean hasIsVisible()
415 423
    {
416
        return this._visible;
417
    } //-- boolean getVisible() 
424
        return this._has_isVisible;
425
    } //-- boolean hasIsVisible() 
418 426

  
419 427
    /**
420 428
     * Method hasPosition
......
425 433
    } //-- boolean hasPosition() 
426 434

  
427 435
    /**
428
     * Method hasVisible
429
     */
430
    public boolean hasVisible()
431
    {
432
        return this._has_visible;
433
    } //-- boolean hasVisible() 
434

  
435
    /**
436 436
     * Method isValid
437 437
     */
438 438
    public boolean isValid()
......
641 641
    } //-- void setComboScale(com.iver.andami.plugins.config.generate.ComboScale) 
642 642

  
643 643
    /**
644
     * Sets the value of field 'isVisible'.
645
     * 
646
     * @param isVisible the value of field 'isVisible'.
647
     */
648
    public void setIsVisible(boolean isVisible)
649
    {
650
        this._isVisible = isVisible;
651
        this._has_isVisible = true;
652
    } //-- void setIsVisible(boolean) 
653

  
654
    /**
644 655
     * Sets the value of field 'name'.
645 656
     * 
646 657
     * @param name the value of field 'name'.
......
692 703
    } //-- void setSelectableTool(com.iver.andami.plugins.config.generate.SelectableTool) 
693 704

  
694 705
    /**
695
     * Sets the value of field 'visible'.
696
     * 
697
     * @param visible the value of field 'visible'.
698
     */
699
    public void setVisible(boolean visible)
700
    {
701
        this._visible = visible;
702
        this._has_visible = true;
703
    } //-- void setVisible(boolean) 
704

  
705
    /**
706 706
     * Method unmarshal
707 707
     * 
708 708
     * @param reader

Also available in: Unified diff