public class PreferenceWindow
extends java.lang.Object
Modifier and Type | Method | Description |
---|---|---|
void |
addRowGroupLinkedTo(java.lang.String propertyKey,
PWRowGroup rowGroup) |
Add a row group that is linked to a given property
|
PWTab |
addTab(org.eclipse.swt.graphics.Image image,
java.lang.String text) |
Add a tab to the preference window
|
void |
addWidgetLinkedTo(java.lang.String propertyKey,
PWWidget widget) |
Add a widget that is linked to a given property
|
static PreferenceWindow |
create(java.util.Map<java.lang.String,java.lang.Object> values) |
Create a preference window (a singleton)
|
static PreferenceWindow |
create(org.eclipse.swt.widgets.Shell parent,
java.util.Map<java.lang.String,java.lang.Object> values) |
Create a preference window (a singleton)
|
void |
fireEnablers() |
Fire all enablers
|
static PreferenceWindow |
getInstance() |
|
int |
getSelectedTab() |
|
org.eclipse.swt.widgets.Shell |
getShell() |
|
java.lang.Object |
getValueFor(java.lang.String key) |
|
java.util.Map<java.lang.String,java.lang.Object> |
getValues() |
|
boolean |
open() |
Open the preference window
|
void |
setSelectedTab(int selectedTab) |
Set the selected tab
|
void |
setValue(java.lang.String key,
java.lang.Object value) |
Store a value associated to the key
|
public static PreferenceWindow create(org.eclipse.swt.widgets.Shell parent, java.util.Map<java.lang.String,java.lang.Object> values)
parent
- parent shell (may be null)values
- a map that contains all values that will be displayed in
widgetspublic static PreferenceWindow create(java.util.Map<java.lang.String,java.lang.Object> values)
values
- a map that contains all values that will be displayed in
widgetspublic static PreferenceWindow getInstance()
public PWTab addTab(org.eclipse.swt.graphics.Image image, java.lang.String text)
image
- image associated to the tabtext
- text associated to the imagepublic void addWidgetLinkedTo(java.lang.String propertyKey, PWWidget widget)
propertyKey
- the propertywidget
- the widgetpublic void addRowGroupLinkedTo(java.lang.String propertyKey, PWRowGroup rowGroup)
propertyKey
- the propertyrowGroup
- the widgetpublic boolean open()
true
if the user pressed on the Ok button,
false
if the user pressed on the Cancel buttonpublic void fireEnablers()
public int getSelectedTab()
public java.lang.Object getValueFor(java.lang.String key)
key
- public java.util.Map<java.lang.String,java.lang.Object> getValues()
public void setValue(java.lang.String key, java.lang.Object value)
key
- value
- public void setSelectedTab(int selectedTab)
selectedTab
- public org.eclipse.swt.widgets.Shell getShell()