org.formaria.editor.visualizer
Class ModelVisualizerFactory

java.lang.Object
  extended by org.formaria.editor.visualizer.ModelVisualizerFactory

public class ModelVisualizerFactory
extends java.lang.Object


Constructor Summary
ModelVisualizerFactory()
           
 
Method Summary
static javax.swing.ImageIcon getIcon(DataModel model)
          Gets the icon for the given model node type.
static javax.swing.ImageIcon getIcon(java.lang.String dataName)
          Returns the icon for the visualiser
static javax.swing.ImageIcon getLoadingIcon()
          Gets the data visualiser icon representation of the node "getting value.."
static javax.swing.ImageIcon getPojCollectionIcon()
          Gets the data visualiser icon representation of the pojo collection property
static javax.swing.ImageIcon getPojIteratorIcon()
          Gets the data visualiser icon representation of the pojo collection iterator.
static javax.swing.ImageIcon getPojMethodArgumentIcon()
          Gets the data visualiser icon representation of the signel argument of the pojo method.
static javax.swing.ImageIcon getPojMethodArgumentsIcon()
          Gets the data visualiser icon representation of the arguments of the pojo method.
static javax.swing.ImageIcon getPojoPropertyIcon()
          Gets the data visualiser icon representation of the pojo property.
static javax.swing.ImageIcon getPojTransientPropertyIcon()
          Gets the data visualiser icon representation of the pojo transient property
static java.awt.Component getVisualizer(DataModel node, ModelVisualiserPanel panel)
          Returns the visualizer for the model node
static boolean isDbFieldModel(DataModel model)
          Determines whether the model is database row model node.
static boolean isDbRowModel(DataModel model)
          Determines whether the model is database row model node.
static boolean isDbTableModel(DataModel model)
          Determines whether the model is database table model node.
static boolean isLoading(DataModel model)
           
static boolean isPojoCollectionProperty(DataModel model)
          Indicates whether the specified model node is wrapping a collection object (as the pojo property)
static boolean isPojoIterator(DataModel model)
          Gets whether the specified model node represents a pojo iterator.
static boolean isPojoMethodArgument(DataModel model)
          Gets whether the specified model node represents one single argument of the pojo method.
static boolean isPojoMethodArguments(DataModel model)
          Gets whether the specified model node represents arguments of the pojo method.
static boolean isPojoModel(DataModel model)
          Determines whether model is POJO model node.
static boolean isPojoProperty(DataModel model)
          Gets whehter the specified model node represents a pojo property.
static boolean isPojoTransientProperty(DataModel model)
          Gets whether the specified model node represents a transient pojo property.
static boolean isStaticListModel(DataModel model)
           
static boolean isStaticTableModel(DataModel model)
          Determines whether model is static table model node
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelVisualizerFactory

public ModelVisualizerFactory()
Method Detail

isDbTableModel

public static boolean isDbTableModel(DataModel model)
Determines whether the model is database table model node.

Parameters:
model - the DataModel that is being checked
Returns:
true if the model is DatabaseTableModel or runtime wrapper for DatabaseTableModel, false otherwise

isDbRowModel

public static boolean isDbRowModel(DataModel model)
Determines whether the model is database row model node.

Parameters:
model - the DataModel that is being checked
Returns:
true if the model is DatabaseRowModel or runtime wrapper for DatabaseRowModel, false otherwise

isDbFieldModel

public static boolean isDbFieldModel(DataModel model)
Determines whether the model is database row model node.

Parameters:
model - the DataModel that is being checked
Returns:
true if the model is DatabaseFieldModel or runtime wrapper for DatabaseFieldModel, false otherwise

isStaticTableModel

public static boolean isStaticTableModel(DataModel model)
Determines whether model is static table model node

Parameters:
model - the DataModel node to be checked
Returns:
true if the model is a static table model node, false otherwise

isStaticListModel

public static boolean isStaticListModel(DataModel model)

isPojoModel

public static boolean isPojoModel(DataModel model)
Determines whether model is POJO model node.

Parameters:
model - the DataModel node to be checked
Returns:
true if the model is a POJO model node, false otherwise

isPojoCollectionProperty

public static boolean isPojoCollectionProperty(DataModel model)
Indicates whether the specified model node is wrapping a collection object (as the pojo property)


isPojoProperty

public static boolean isPojoProperty(DataModel model)
Gets whehter the specified model node represents a pojo property.


isPojoTransientProperty

public static boolean isPojoTransientProperty(DataModel model)
Gets whether the specified model node represents a transient pojo property.


isPojoIterator

public static boolean isPojoIterator(DataModel model)
Gets whether the specified model node represents a pojo iterator.


isLoading

public static boolean isLoading(DataModel model)

isPojoMethodArgument

public static boolean isPojoMethodArgument(DataModel model)
Gets whether the specified model node represents one single argument of the pojo method.


isPojoMethodArguments

public static boolean isPojoMethodArguments(DataModel model)
Gets whether the specified model node represents arguments of the pojo method.


getLoadingIcon

public static javax.swing.ImageIcon getLoadingIcon()
Gets the data visualiser icon representation of the node "getting value.."


getPojoPropertyIcon

public static javax.swing.ImageIcon getPojoPropertyIcon()
Gets the data visualiser icon representation of the pojo property.


getPojTransientPropertyIcon

public static javax.swing.ImageIcon getPojTransientPropertyIcon()
Gets the data visualiser icon representation of the pojo transient property


getPojCollectionIcon

public static javax.swing.ImageIcon getPojCollectionIcon()
Gets the data visualiser icon representation of the pojo collection property


getPojIteratorIcon

public static javax.swing.ImageIcon getPojIteratorIcon()
Gets the data visualiser icon representation of the pojo collection iterator.


getPojMethodArgumentIcon

public static javax.swing.ImageIcon getPojMethodArgumentIcon()
Gets the data visualiser icon representation of the signel argument of the pojo method.


getPojMethodArgumentsIcon

public static javax.swing.ImageIcon getPojMethodArgumentsIcon()
Gets the data visualiser icon representation of the arguments of the pojo method.


getVisualizer

public static java.awt.Component getVisualizer(DataModel node,
                                               ModelVisualiserPanel panel)
Returns the visualizer for the model node

Parameters:
node - the DataModel node
panel - panel that will contain returned component.
Returns:
the Component visualizer for the model node. or a plain JPanel if the node's type is not known.

getIcon

public static javax.swing.ImageIcon getIcon(DataModel model)
Gets the icon for the given model node type.

Parameters:
model - the model node whose icon representation is to be returned
Returns:
ImageIcon object

getIcon

public static javax.swing.ImageIcon getIcon(java.lang.String dataName)
Returns the icon for the visualiser

Parameters:
dataName - the path of the model node
Returns:
visualizer icon