gvsig-raster / org.gvsig.raster / trunk / org.gvsig.raster / org.gvsig.raster.swing / org.gvsig.raster.swing.api / src / main / java / org / gvsig / raster / swing / buttonbar / ButtonBar.java @ 2443
History | View | Annotate | Download (2.33 KB)
1 |
/* gvSIG. Geographic Information System of the Valencian Government
|
---|---|
2 |
*
|
3 |
* Copyright (C) 2007-2008 Infrastructures and Transports Department
|
4 |
* of the Valencian Government (CIT)
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 2
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
*/
|
22 |
package org.gvsig.raster.swing.buttonbar; |
23 |
|
24 |
import javax.swing.JButton; |
25 |
|
26 |
|
27 |
/**
|
28 |
* Bar of buttons of 16x16 pixels
|
29 |
* @author Nacho Brodin (nachobrodin@gmail.com)
|
30 |
*/
|
31 |
public interface ButtonBar { |
32 |
/**
|
33 |
* A?ade un boton al ArrayList de los botones.
|
34 |
*
|
35 |
* @param iconName: nombre del icono asignado al boton. La imagen tendr?a que
|
36 |
* estar dentro de la carpeta "images/"
|
37 |
* @param tip: tip del boton;
|
38 |
* @param order: orden que ocupar? el boton dentro del control
|
39 |
*/
|
40 |
public void addButton(String iconName, String tip, int order); |
41 |
|
42 |
/**
|
43 |
* Elimina el bot?n correspondiente al indice que le pasamos.
|
44 |
* @param index
|
45 |
*/
|
46 |
public void delButton(int index); |
47 |
|
48 |
/**
|
49 |
* A?ade en el panel los botones que tenemos en el ArrayList.
|
50 |
*
|
51 |
*/
|
52 |
public void addList(); |
53 |
|
54 |
|
55 |
/**
|
56 |
* Esta funci?n deshabilita todos los controles y guarda sus valores
|
57 |
* de habilitado o deshabilitado para que cuando se ejecute restoreControlsValue
|
58 |
* se vuelvan a quedar como estaba
|
59 |
*/
|
60 |
public void disableAllControls(); |
61 |
|
62 |
/**
|
63 |
* Esta funci?n deja los controles como estaban al ejecutar la funci?n
|
64 |
* disableAllControls
|
65 |
*/
|
66 |
public void restoreControlsValue(); |
67 |
|
68 |
/**
|
69 |
* M?todo para acceder a los botones del control;
|
70 |
* @param index
|
71 |
* @return
|
72 |
*/
|
73 |
public JButton getButton(int index); |
74 |
|
75 |
/**
|
76 |
* M?todo para establecer la posici?n de los botones dentro del control.
|
77 |
* @param align: "left" o "right"
|
78 |
*/
|
79 |
public void setButtonAlignment(String align); |
80 |
|
81 |
public void setComponentBorder(boolean br); |
82 |
} |