Revision 12906
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/AbstractTypeSymbolEditorPanel.java | ||
---|---|---|
43 | 43 |
* |
44 | 44 |
* $Id$ |
45 | 45 |
* $Log$ |
46 |
* Revision 1.9 2007-07-30 12:56:04 jaume |
|
46 |
* Revision 1.10 2007-08-03 07:34:15 jaume |
|
47 |
* javadoc |
|
48 |
* |
|
49 |
* Revision 1.9 2007/07/30 12:56:04 jaume |
|
47 | 50 |
* organize imports, java 5 code downgraded to 1.4 and added PictureFillSymbol |
48 | 51 |
* |
49 | 52 |
* Revision 1.8 2007/07/18 06:56:03 jaume |
... | ... | |
106 | 109 |
import com.iver.cit.gvsig.fmap.core.CartographicSupport; |
107 | 110 |
import com.iver.cit.gvsig.fmap.core.symbols.ISymbol; |
108 | 111 |
/** |
112 |
* <p> |
|
109 | 113 |
* Abstract class that all the Symbol settings interface must extend. |
110 |
* |
|
114 |
* </p> |
|
115 |
* <p> |
|
116 |
* The components contained by this panel are automatically placed in |
|
117 |
* the SymbolEditor symbol options area. In case other panel of this |
|
118 |
* was already placed, then the old one is replaced by this. |
|
119 |
* </p> |
|
120 |
* <p> |
|
121 |
* </p> |
|
111 | 122 |
* @author jaume dominguez faus - jaume.dominguez@iver.es |
112 | 123 |
*/ |
113 | 124 |
public abstract class AbstractTypeSymbolEditorPanel { |
... | ... | |
124 | 135 |
|
125 | 136 |
/** |
126 | 137 |
* Creates a new instance of this type symbol editor panel associated to |
127 |
* its parent SymbolEditor which will be notified of the changes in
|
|
138 |
* its SymbolEditor parent which will be notified of the changes in
|
|
128 | 139 |
* order to keep the symbol preview in sync with the user settings. |
129 | 140 |
* @param owner, the SymbolEditor which created this. |
130 | 141 |
*/ |
... | ... | |
133 | 144 |
} |
134 | 145 |
|
135 | 146 |
/** |
136 |
* <p>Returns the name of the config tabs that will be shown in the selector combo box. |
|
147 |
* <p> |
|
148 |
* Returns the name of the config tabs that will be shown in the selector combo box. |
|
137 | 149 |
* This is typically a human-readable (and also translatable) name for the symbol that |
138 | 150 |
* this TypeEditorPanel deals with, but maybe you prefer to use any other one.<br> |
139 | 151 |
* </p> |
... | ... | |
146 | 158 |
public abstract String getName(); |
147 | 159 |
|
148 | 160 |
/** |
149 |
* <p>Due to the complexity that many symbols settings can reach, the SymbolEditorPanel is |
|
161 |
* <p> |
|
162 |
* Due to the complexity that many symbols settings can reach, the SymbolEditorPanel is |
|
150 | 163 |
* designed in a tabbed-based fashion. So, you can use as many of pages you want to put |
151 | 164 |
* your components. This pages are regular JPanels that will be automatically added to |
152 | 165 |
* the SymbolEditor dialog.<br> |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/EditorTool.java | ||
---|---|---|
58 | 58 |
super(); |
59 | 59 |
owner = targetEditor; |
60 | 60 |
} |
61 |
|
|
61 | 62 |
public abstract Cursor getCursor(); |
62 | 63 |
|
63 | 64 |
public void mouseClicked(MouseEvent e) {} |
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/JComboBoxColorScheme.java | ||
---|---|---|
74 | 74 |
File.separator + |
75 | 75 |
"ColorSchemes"; |
76 | 76 |
|
77 |
private ActionListener innerAction = new ActionListener() { |
|
77 |
private ActionListener innerActionUpdateTooltip = new ActionListener() {
|
|
78 | 78 |
public void actionPerformed(ActionEvent e) { |
79 | 79 |
Object o = getSelectedItem(); |
80 | 80 |
if (o != null) { |
... | ... | |
113 | 113 |
|
114 | 114 |
addItem(array); |
115 | 115 |
} |
116 |
addActionListener(innerAction); |
|
116 |
addActionListener(innerActionUpdateTooltip);
|
|
117 | 117 |
setRenderer(new ListCellRenderer() { |
118 | 118 |
public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { |
119 | 119 |
ArrayList array = (ArrayList) value; |
... | ... | |
131 | 131 |
|
132 | 132 |
if (o == null) return null; |
133 | 133 |
|
134 |
ColorTable ct = ((ColorTablePaint) o).colorTable;
|
|
134 |
ColorTable ct = ((ColorTablePaint) ((ArrayList) o).get(1)).colorTable;
|
|
135 | 135 |
return (ColorItem[]) ct.getColorItems().toArray(new ColorItem[0]) ; |
136 | 136 |
} |
137 | 137 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/styling/StyleEditor.java | ||
---|---|---|
253 | 253 |
} |
254 | 254 |
|
255 | 255 |
}; |
256 |
|
|
256 | 257 |
private EditorTool newTextTool = new EditorTool(StyleEditor.this) { |
257 | 258 |
private /*static*/ final Cursor cursor = Cursor.getDefaultCursor(); |
258 | 259 |
private Point pIni, pEnd; |
... | ... | |
268 | 269 |
public void mouseReleased(MouseEvent e) { |
269 | 270 |
|
270 | 271 |
} |
271 |
|
|
272 | 272 |
public void mouseDragged(MouseEvent e) { |
273 | 273 |
pEnd = e.getPoint(); |
274 | 274 |
|
trunk/applications/appgvSIG/src/com/iver/cit/gvsig/gui/JUnitsComboBox.java | ||
---|---|---|
62 | 62 |
*/ |
63 | 63 |
public JUnitsComboBox() { |
64 | 64 |
this(true); |
65 |
// super(); |
|
66 |
// String[] units = new String[MapContext.NAMES.length+1]; |
|
67 |
// for (int i = 0; i < MapContext.NAMES.length; i++) { |
|
68 |
// units[i] = PluginServices.getText(this, MapContext.NAMES[i]); |
|
69 |
// } |
|
70 |
// units[units.length-1] = PluginServices.getText(this, "pixels"); |
|
71 |
// |
|
72 |
// for (int i = 0; i < units.length; i++) { |
|
73 |
// super.addItem(units[i]); |
|
74 |
// } |
|
75 |
// setSelectedIndex(units.length-1); |
|
76 |
|
|
77 | 65 |
} |
78 | 66 |
|
79 | 67 |
/** |
Also available in: Unified diff