|
org.netbeans.modules.java.api.common/0 1.37 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.java.api.common.ui.PlatformUiSupport
public final class PlatformUiSupport
Support class for JavaPlatform manipulation in project customizer.
| Method Summary | |
|---|---|
static ComboBoxModel |
createPlatformComboBoxModel(String activePlatform)
Create a ComboBoxModel of Java platforms. |
static ListCellRenderer |
createPlatformListCellRenderer()
Create a ListCellRenderer for rendering items of the ComboBoxModel
created by the createPlatformComboBoxModel(String) method. |
static ComboBoxModel |
createSourceLevelComboBoxModel(ComboBoxModel platformComboBoxModel,
String initialSourceLevel,
String initialTargetLevel)
Exactly like #createSourceLevelComboBoxModel(ComboBoxModel, String, String, JDK)
but without any minimal JDK version. |
static ComboBoxModel |
createSourceLevelComboBoxModel(ComboBoxModel platformComboBoxModel,
String initialSourceLevel,
String initialTargetLevel,
SpecificationVersion minimalSpecificationVersion)
Create ComboBoxModel of source levels for active platform. |
static ListCellRenderer |
createSourceLevelListCellRenderer()
Create ListCellRenderer for source levels. |
static JavaPlatform |
getPlatform(Object platformKey)
Return a JavaPlatform for an item obtained from the ComboBoxModel created by
the createPlatformComboBoxModel(String) method. |
static void |
storePlatform(EditableProperties props,
UpdateHelper helper,
String projectConfigurationNamespace,
Object platformKey,
Object sourceLevelKey)
Stores active platform, javac.source and javac.target into the project's metadata. |
static void |
storePlatform(EditableProperties props,
UpdateHelper helper,
String projectConfigurationNamespace,
Object platformKey,
Object sourceLevelKey,
boolean updatePreferredPlatform)
Stores active platform, javac.source and javac.target into the project's metadata. |
static void |
storePlatform(EditableProperties props,
UpdateHelper helper,
String projectConfigurationNamespace,
String platformName,
SpecificationVersion sourceLevel)
Like #storePlatform(EditableProperties, UpdateHelper, Object, Object), but platform name may be
null (in such case the default platform is used). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static ComboBoxModel createPlatformComboBoxModel(String activePlatform)
ComboBoxModel of Java platforms.
The model listens on the JavaPlatformManager and update its
state according to the changes.
activePlatform - the active project's platform, can be null.
ComboBoxModel.public static ListCellRenderer createPlatformListCellRenderer()
ListCellRenderer for rendering items of the ComboBoxModel
created by the createPlatformComboBoxModel(String) method.
ListCellRenderer.
public static void storePlatform(EditableProperties props,
UpdateHelper helper,
String projectConfigurationNamespace,
String platformName,
SpecificationVersion sourceLevel)
#storePlatform(EditableProperties, UpdateHelper, Object, Object), but platform name may be
null (in such case the default platform is used).
props - project's shared properties.helper - UpdateHelper that is capable to upgrade project metadata if needed.projectConfigurationNamespace - project configuration namespace.platformName - platform name to store, can be null.sourceLevel - specification version to store.
public static void storePlatform(@NonNull
EditableProperties props,
@NonNull
UpdateHelper helper,
@NonNull
String projectConfigurationNamespace,
@NonNull
Object platformKey,
@NullAllowed
Object sourceLevelKey)
props - project's shared propertieshelper - UpdateHelper that is capable to upgrade project metadata if needed.projectConfigurationNamespace - project configuration namespace.platformKey - the PlatformKey got from the platform model.sourceLevelKey - SourceLevelKey representing source level; can be null.
public static void storePlatform(@NonNull
EditableProperties props,
@NonNull
UpdateHelper helper,
@NonNull
String projectConfigurationNamespace,
@NonNull
Object platformKey,
@NullAllowed
Object sourceLevelKey,
boolean updatePreferredPlatform)
props - project's shared propertieshelper - UpdateHelper that is capable to upgrade project metadata if needed.projectConfigurationNamespace - project configuration namespace.platformKey - the PlatformKey got from the platform model.sourceLevelKey - SourceLevelKey representing source level; can be null.updatePreferredPlatform - if true the PreferredProjectPlatform will be updatedpublic static JavaPlatform getPlatform(Object platformKey)
JavaPlatform for an item obtained from the ComboBoxModel created by
the createPlatformComboBoxModel(String) method. This method
can return null if the platform is broken.
platformKey - an item obtained from ComboBoxModel created by
createPlatformComboBoxModel(String).
JavaPlatform or null in case when platform is broken.
IllegalArgumentException - if the input parameter is not an object created by platform combobox model.
public static ComboBoxModel createSourceLevelComboBoxModel(ComboBoxModel platformComboBoxModel,
String initialSourceLevel,
String initialTargetLevel,
SpecificationVersion minimalSpecificationVersion)
ComboBoxModel of source levels for active platform.
The model listens on the platform's ComboBoxModel and update its
state according to the changes. It is possible to define minimal JDK version.
platformComboBoxModel - the platform's model used for listenning.initialSourceLevel - initial source level value, null if unknown.initialTargetLevel - initial target level value, null if unknown.minimalSpecificationVersion - minimal JDK version to be displayed. It can be null if all the JDK versions
should be displayed (typically for Java SE project).
ComboBoxModel of SourceLevelKey.createSourceLevelComboBoxModel(ComboBoxModel, String, String)
public static ComboBoxModel createSourceLevelComboBoxModel(ComboBoxModel platformComboBoxModel,
String initialSourceLevel,
String initialTargetLevel)
#createSourceLevelComboBoxModel(ComboBoxModel, String, String, JDK)
but without any minimal JDK version.
platformComboBoxModel - the platform's model used for listenning.initialSourceLevel - initial source level value, null if unknown.initialTargetLevel - initial target level value, null if unknown.
ComboBoxModel of SourceLevelKey.#createSourceLevelComboBoxModel(ComboBoxModel, String, String, JDK)public static ListCellRenderer createSourceLevelListCellRenderer()
ListCellRenderer for source levels. This method could be used when highlighting
of illegal source levels is needed.
ListCellRenderer for source levels.
|
org.netbeans.modules.java.api.common/0 1.37 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||