站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 4.1.0

Models (NetBeans View Model) - NetBeans API Javadoc 4.1.0

 

org.netbeans.spi.viewmodel
Class Models

java.lang.Object
  extended byorg.netbeans.spi.viewmodel.Models

public final class Models
extends Object

Contains various utility methods for various models.


Nested Class Summary
static interface Models.ActionPerformer
          Support interface for #createAction(String,Object,Models.ActionPerformer) 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 JComponent createView(Models.CompoundModel compoundModel)
          Creates a new instances of TreeTableView for given TreeModel, TreeModel, NodeModel, NodeActionsProvider and list of ColumnModels.
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

EMPTY_MODEL

public static Models.CompoundModel EMPTY_MODEL
Empty model - returns default root node with no children.


MULTISELECTION_TYPE_EXACTLY_ONE

public static int MULTISELECTION_TYPE_EXACTLY_ONE

MULTISELECTION_TYPE_ALL

public static int MULTISELECTION_TYPE_ALL

MULTISELECTION_TYPE_ANY

public static int MULTISELECTION_TYPE_ANY
Constructor Detail

Models

public Models()
Method Detail

createView

public static JComponent createView(Models.CompoundModel compoundModel)
Creates a new instances of TreeTableView for given TreeModel, TreeModel, NodeModel, NodeActionsProvider and list of ColumnModels.

Returns:
new instance of complete model

setModelsToView

public static void setModelsToView(JComponent view,
                                   Models.CompoundModel compoundModel)
Set given models to given view instance.

Parameters:
view - a view instance

createCompoundModel

public static Models.CompoundModel createCompoundModel(List models)
Creates one Models.CompoundModel from given list of models.

Parameters:
models - a list of models
Returns:
Models.CompoundModel encapsulating given list of models

createAction

public static Action createAction(String displayName,
                                  Models.ActionPerformer performer,
                                  int multiselectionType)
Returns Action for given parameters.

Parameters:
displayName - a display name for action
performer - a performer for action
Returns:
a new instance of Action for given parameters

treeFeatures

public static Models.TreeFeatures treeFeatures(JComponent view)
                                        throws UnsupportedOperationException
Returns implementation of tree view features for given view.

Parameters:
view - a view created by this Models class
Returns:
implementation of tree view features
Throws:
UnsupportedOperationException - in the case that given view is not tree view

 

Built on May 4 2005.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.