public class SwingUrlListPreferenceProperty extends AbstractBasicSimpleEditableChangeableItem implements UrlListPreferenceProperty, EditablePreferenceProperty
| Modifier and Type | Class and Description |
|---|---|
static class |
SwingUrlListPreferenceProperty.UrlSelectionMode
Modes for local file URL selection.
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DIALOG_BUTTON
I18n tag extension for button of associated dialog.
|
static java.lang.String |
DIALOG_FILTER
118n tag extension for file filter definition.
|
static java.lang.String |
DIALOG_LABEL
I18n tag extension for label of associated dialog.
|
static java.lang.String |
DIALOG_TITLE
I18n tag extension for title of associated dialog.
|
PROPERTY_VALUE| Constructor and Description |
|---|
SwingUrlListPreferenceProperty(java.lang.String basicName,
java.lang.String baseTag,
java.util.Collection<java.lang.String> startList,
SwingUrlListPreferenceProperty.UrlSelectionMode selectionMode)
Create a URL list with the given basic name and basic tag.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addUrl(java.lang.String url)
Add a URL to the end of the list.
|
void |
addUrl(java.lang.String url,
int pos)
Insert a URL at the given position.
|
Indexable<java.lang.String> |
getDefaults()
Get the defaults.
|
(package private) javax.swing.JButton |
getDialogButton()
Get the button of the associated dialog.
|
(package private) javax.swing.filechooser.FileFilter |
getDialogFileFilter()
Get the file filter for the associated dialog.
|
(package private) javax.swing.JLabel |
getDialogLabel()
Get the label text of the associated dialog.
|
(package private) java.lang.String |
getDialogTitle()
Get the title of the associated dialog.
|
EditorProvider |
getEditorProvider(java.util.Locale l)
Get the editor components for editing this preference property.
|
SwingUrlListPreferenceProperty.UrlSelectionMode |
getSelectionMode()
Get the selection mode.
|
java.util.Collection<java.lang.String> |
getUrlList()
Get the collection of URLs.
|
void |
readFrom(java.util.prefs.Preferences preferences)
Read the property value from the preferences.
|
void |
remove(int pos)
Remove the URL at the given position.
|
(package private) void |
setUrlList(java.util.Collection<java.lang.String> newList)
Set the URL list.
|
void |
storeTo(java.util.prefs.Preferences preferences)
Store the current property value in the preferences.
|
void |
swap(int pos1,
int pos2)
Exchange two entries in the URL list.
|
getBaseTag, getLabelString, getMenuString, getName, getStringaddValueChangeListener, addValueChangeListenerWeakly, firePropertyChange, fireValueChange, fireValueChange, fireValueChange, getBasicName, getPropertyName, removeValueChangeListener, removeValueChangeListenerWeaklyclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNameaddValueChangeListener, addValueChangeListenerWeakly, removeValueChangeListener, removeValueChangeListenerWeaklypublic static final java.lang.String DIALOG_TITLE
public static final java.lang.String DIALOG_BUTTON
public static final java.lang.String DIALOG_LABEL
public static final java.lang.String DIALOG_FILTER
public SwingUrlListPreferenceProperty(@NotNull java.lang.String basicName, @NotNull java.lang.String baseTag, @Nullable java.util.Collection<java.lang.String> startList, @NotNull SwingUrlListPreferenceProperty.UrlSelectionMode selectionMode)
basicName - basic namebaseTag - basic I18n tagstartList - start list, if null there will be no "Defaults" button in the editorselectionMode - URL selection mode@NotNull public SwingUrlListPreferenceProperty.UrlSelectionMode getSelectionMode()
@NotNull public EditorProvider getEditorProvider(@Nullable java.util.Locale l)
getEditorProvider in interface EditablePropertyl - locale used for i18npublic void readFrom(@NotNull java.util.prefs.Preferences preferences)
readFrom in interface PreferencePropertypreferences - preferences from where to read the property valuepublic void storeTo(@NotNull java.util.prefs.Preferences preferences)
storeTo in interface PreferencePropertypreferences - preferences where to store the property valuepublic void addUrl(java.lang.String url)
url - string representing a URLpublic void addUrl(java.lang.String url,
int pos)
url - string representing an URLpos - insertion positionpublic void remove(int pos)
pos - position to remove from the listpublic void swap(int pos1,
int pos2)
pos1 - position of first entrypos2 - position of second entrypublic java.util.Collection<java.lang.String> getUrlList()
getUrlList in interface UrlListPreferencePropertyvoid setUrlList(@NotNull java.util.Collection<java.lang.String> newList)
newList - new URL list@Nullable public Indexable<java.lang.String> getDefaults()
null to have no reset button in the editor@NotNull java.lang.String getDialogTitle()
@NotNull javax.swing.JButton getDialogButton()
@NotNull javax.swing.JLabel getDialogLabel()
@Nullable javax.swing.filechooser.FileFilter getDialogFileFilter()