|
org.netbeans.spi.viewmodel/2 1.9.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.netbeans.spi.viewmodel.Models
public final class Models
Contains various utility methods for various models.
Nested Class Summary | |
---|---|
static interface |
Models.ActionPerformer
Support interface for createAction(String,Models.ActionPerformer,int) method. |
static class |
Models.CompoundModel
This model encapsulates all currently supported models. |
static class |
Models.TreeFeatures
Implements set of tree view features. |
Field Summary | |
---|---|
static Models.CompoundModel |
EMPTY_MODEL
Empty model - returns default root node with no children. |
static int |
MULTISELECTION_TYPE_ALL
|
static int |
MULTISELECTION_TYPE_ANY
|
static int |
MULTISELECTION_TYPE_EXACTLY_ONE
|
Constructor Summary | |
---|---|
Models()
|
Method Summary | |
---|---|
static Action |
createAction(String displayName,
Models.ActionPerformer performer,
int multiselectionType)
Returns Action for given parameters. |
static Models.CompoundModel |
createCompoundModel(List models)
Creates one Models.CompoundModel from given list of models. |
static Models.CompoundModel |
createCompoundModel(List models,
String propertiesHelpID)
Creates one Models.CompoundModel from given list of models. |
static JComponent |
createView(Models.CompoundModel compoundModel)
Creates a new instance of TreeTableView for given Models.CompoundModel . |
static void |
setModelsToView(JComponent view,
Models.CompoundModel compoundModel)
Set given models to given view instance. |
static Models.TreeFeatures |
treeFeatures(JComponent view)
Returns implementation of tree view features for given view. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Models.CompoundModel EMPTY_MODEL
public static int MULTISELECTION_TYPE_EXACTLY_ONE
public static int MULTISELECTION_TYPE_ALL
public static int MULTISELECTION_TYPE_ANY
Constructor Detail |
---|
public Models()
Method Detail |
---|
public static JComponent createView(Models.CompoundModel compoundModel)
Models.CompoundModel
.
compoundModel
- a compound model instance
public static void setModelsToView(JComponent view, Models.CompoundModel compoundModel)
view
- a view instance - must be an instance created by createView(org.netbeans.spi.viewmodel.Models.CompoundModel)
method.compoundModel
- a compound model instancepublic static Models.CompoundModel createCompoundModel(List models)
Models.CompoundModel
from given list of models.
If this list does not include any instance of TreeModel or TreeExpansionModel, a default implementation of these models is created based on the instance of this list. Thus you get one implementation per provided instance of the models list.
models
- a list of models
Models.CompoundModel
encapsulating given list of modelspublic static Models.CompoundModel createCompoundModel(List models, String propertiesHelpID)
Models.CompoundModel
from given list of models.
If this list does not include any instance of TreeModel or TreeExpansionModel, a default implementation of these models is created based on the instance of this list. Thus you get one implementation per provided instance of the models list.
models
- a list of modelspropertiesHelpID
- The help ID, which is set for the properties
sheets created from this model.
Models.CompoundModel
encapsulating given list of modelspublic static Action createAction(String displayName, Models.ActionPerformer performer, int multiselectionType)
Action
for given parameters.
displayName
- a display name for actionperformer
- a performer for actionmultiselectionType
- The type of the multiselection - one of the
MULTISELECTION_TYPE_* constants.
Action
for given parameterspublic static Models.TreeFeatures treeFeatures(JComponent view) throws UnsupportedOperationException
view
- a view created by this Models class
UnsupportedOperationException
- in the case that given
view is not tree view
|
org.netbeans.spi.viewmodel/2 1.9.31 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |