Revision 3897

View differences:

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

  
117 117
	/** DOCUMENT ME! */
118 118
	private NewStatusBar bEstado = null;
119
	
119

  
120 120
	/** Asocia los nombres con las barras de herramientas */
121 121
	private HashMap toolBarMap = new HashMap();
122
    
122

  
123 123
    /**
124 124
     * actionCommand del tool seleccionado
125 125
     */
......
273 273
			jtb.setRollover(true);
274 274
			toolBarMap.put(name, jtb);
275 275
			toolBars.add(jtb);
276

  
276 277
		}
277 278

  
278 279
		jtb.addButton(buttonGroup, btn);
279

  
280 280
		controlClass.put(btn, loader.loadClass(ext.getClassName()));
281 281

  
282 282
		if (selectableTool.getTooltip() != null) {
......
437 437
        {
438 438
            menuPadre.addSeparator();
439 439
            return;
440
        } 
440
        }
441 441

  
442 442
		JMenuItem nuevoMenu = createJMenuItem(loader, menu);
443 443
		nuevoMenu.addMouseListener(tooltipListener);
444 444
		nuevoMenu.addActionListener(this);
445
		menuPadre.add(nuevoMenu);        
445
		menuPadre.add(nuevoMenu);
446 446
        controlClass.put(nuevoMenu, loader.loadClass(ext.getClassName()));
447 447
	}
448 448

  
......
649 649

  
650 650
		String name = getName(menu.getName(), loader);
651 651

  
652
		//Se crea el control popupmenu        
652
		//Se crea el control popupmenu
653 653
		JPopUpMenu popupMenu = (JPopUpMenu) popupMap.get(name);
654 654

  
655 655
		if (popupMenu == null) {
......
814 814
		HashMap estadoExtensiones = new HashMap();
815 815
		HashMap visibilidadExtensiones = new HashMap();
816 816

  
817
		while (e.hasNext()) { 
817
		while (e.hasNext()) {
818 818
			ExtensionDecorator ext = (ExtensionDecorator) e.next();
819
			
819

  
820 820
			try {
821 821
				if (estadoExtensiones.get(ext) == null) {
822 822
					boolean b;
......
989 989
        selectedTool = actionCommand;
990 990

  
991 991
    }
992
    
992

  
993 993
	/**
994 994
	 * DOCUMENT ME!
995 995
	 *
......
1157 1157
    public String getSelectedTool() {
1158 1158
        return selectedTool;
1159 1159
    }
1160
    
1161 1160

  
1161

  
1162 1162
    /**
1163 1163
     * Get a previously added JComponent by name. For example
1164 1164
     * you can use it if you need to obtain a JToolBar to
......
1186 1186
            		return t;
1187 1187

  
1188 1188
        }
1189
        
1189

  
1190 1190
        return null;
1191 1191
    }
1192 1192
}
trunk/frameworks/_fwAndami/src/com/iver/andami/ui/mdiFrame/SelectableToolBar.java
89 89
    	group.add(btn);
90 90
        add(btn);
91 91
    }
92
    
92

  
93 93
    /**
94 94
     * Selects a toggleButton in this toolBar by ActionCommand
95 95
     * @param actionCommand
96 96
     */
97
    public void setSelectedTool(String actionCommand)
98
    {
97
    public void setSelectedTool(String actionCommand){
99 98
        for (int i = 0; i < getComponentCount(); i++) {
100 99
            if (getComponent(i) instanceof JToggleButton)
101 100
            {
102 101
                JToggleButton toggleButton = (JToggleButton) getComponent(i);
103 102
                String aux = toggleButton.getActionCommand();
104
                if (aux != null)  
105
                  if (aux.compareTo(actionCommand) == 0)
106
                      {
103
                if (aux != null)
104
                  if (aux.equals(actionCommand)){
107 105
                        toggleButton.setSelected(true);
108 106
                      }
109 107
            }
110 108
        }
111
        
109

  
112 110
    }
113 111
}
trunk/frameworks/_fwAndami/src/com/iver/andami/ui/mdiFrame/MainFrame.java
96 96
	/**
97 97
	 * Sirve para establecec el mensaje en la barra de estado asociado a una etiqueta
98 98
	 *
99
	 * @return main StatusBar 
99
	 * @return main StatusBar
100 100
	 */
101 101
	public NewStatusBar getStatusBar();
102 102
	/**
......
105 105
	 * @param titulo DOCUMENT ME!
106 106
	 */
107 107
	public void setTitle(String titulo);
108
    
108

  
109 109
    /**
110 110
     * Get a JComponent previously added by name. For example
111 111
     * you can use it if you need to obtain a JToolBar to
......
114 114
     * @return the JComponent or null if none has been found
115 115
     */
116 116
    public JComponent getComponentByName(String name);
117
    
117
    /**
118
     * You can use this function to select the appropiate
119
     * tool inside the toolbars
120
     */
121
    public void setSelectedTool(String actionCommand);
122

  
118 123
}

Also available in: Unified diff