|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openstreetmap.josm.gui.preferences.display.ColorPreference
public class ColorPreference
Nested Class Summary | |
---|---|
static class |
ColorPreference.Factory
|
Field Summary | |
---|---|
(package private) javax.swing.JButton |
colorEdit
|
private javax.swing.JTable |
colors
|
(package private) javax.swing.JButton |
defaultSet
|
private java.util.ArrayList<java.lang.String> |
del
|
(package private) javax.swing.JButton |
remove
|
private javax.swing.table.DefaultTableModel |
tableModel
|
Constructor Summary | |
---|---|
ColorPreference()
|
Method Summary | |
---|---|
void |
addGui(PreferenceTabbedPane gui)
Add the GUI elements to the dialog. |
private void |
fixColorPrefixes()
Add all missing color entries. |
java.util.Map<java.lang.String,java.lang.String> |
getColorModel()
Returns a map with the colors in the table (key = color name without prefix, value = html color code). |
private java.lang.String |
getName(java.lang.String o)
|
TabPreferenceSetting |
getTabPreferenceSetting(PreferenceTabbedPane gui)
Returns the preference setting (displayed in the specified preferences tab pane) that contains this preference setting. |
boolean |
isExpert()
Called to know if the preferences tab has only to be displayed in expert mode. |
(package private) java.lang.Boolean |
isRemoveColor(int row)
|
boolean |
ok()
Called when OK is pressed to save the setting in the preferences file. |
void |
setColorModel(java.util.Map<java.lang.String,java.lang.String> colorMap)
Set the colors to be shown in the preference table. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.swing.table.DefaultTableModel tableModel
private javax.swing.JTable colors
private java.util.ArrayList<java.lang.String> del
javax.swing.JButton colorEdit
javax.swing.JButton defaultSet
javax.swing.JButton remove
Constructor Detail |
---|
public ColorPreference()
Method Detail |
---|
public void setColorModel(java.util.Map<java.lang.String,java.lang.String> colorMap)
colorMap
- the map holding the colors
(key = color id (without prefixes, so only background
; not color.background
),
value = html representation of the color.public java.util.Map<java.lang.String,java.lang.String> getColorModel()
private java.lang.String getName(java.lang.String o)
public void addGui(PreferenceTabbedPane gui)
PreferenceSetting
addGui
in interface PreferenceSetting
java.lang.Boolean isRemoveColor(int row)
private void fixColorPrefixes()
public boolean ok()
PreferenceSetting
ok
in interface PreferenceSetting
public boolean isExpert()
PreferenceSetting
isExpert
in interface PreferenceSetting
public TabPreferenceSetting getTabPreferenceSetting(PreferenceTabbedPane gui)
SubPreferenceSetting
getTabPreferenceSetting
in interface SubPreferenceSetting
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |