ilog.cpl.graphic
Class IlpDefaultGraphicViewStyleManager

java.lang.Object
  extended by ilog.cpl.style.IlpDefaultStyleManager
      extended by ilog.cpl.graphic.IlpDefaultGraphicViewStyleManager
All Implemented Interfaces:
IlpGraphicViewStyleManager, IlpStyleManager

Deprecated. The Style API has been replaced by the Cascading Style Sheet mechanism. Please refer to the User's Manual for further information.

public class IlpDefaultGraphicViewStyleManager
extends IlpDefaultStyleManager
implements IlpGraphicViewStyleManager

This class models the default implementation of a graphic view style manager.

It stores information about styles that are specific to a view and that are used to create the graphic representation of objects.

The styles created by this graphic view style manager overwrite the styles defined at the style manager level.

Since:
JTGO 3.0
Deprecated Since:
JTGO 3.5

Field Summary
 
Fields inherited from class ilog.cpl.style.IlpDefaultStyleManager
context, JAVACLASS_STYLES_BLACK_LIST, styles, stylesInProgress
 
Constructor Summary
IlpDefaultGraphicViewStyleManager(IlpContext context, IlpGraphicView graphicView)
          Deprecated. Creates a default graphic view style manager, based on the given context and to be used by the given graphic view.
 
Method Summary
 void cleanup()
          Deprecated. Forces the Style Manager to clean up unnecessary styles, or styles that correspond to objects that are no longer needed by the application.
 IlpStyleManager getDefaultStyleManager()
          Deprecated. Returns the default style manager used by this configuration.
 IlpStyle getExistingStyle(IlpStyleContext styleContext)
          Deprecated. Gets a style by style context.
 IlpStyle getStyle()
          Deprecated. Returns the style specified for this view.
 IlpStyle getStyle(IlpAttribute attribute)
          Deprecated. Gets a style by attribute.
 IlpStyle getStyle(IlpAttribute attribute, IlpClass clazz)
          Deprecated. Gets a style by attribute.
 IlpStyle getStyle(IlpRepresentationObject ro)
          Deprecated. Return the correct style for this representation object.
 IlpStyle getStyle(IlpRepresentationObject ro, IlpAttribute attribute)
          Deprecated. Return the correct style for this representation object.
 IlpGraphicView getView()
          Deprecated. Returns the graphic view which is using this configuration.
protected  IlpStyle postCreateStyle(IlpStyle original, IlpStyleContext styleContext)
          Deprecated. This method changes the given style, if this is a style for JTGO - because we need to transform an IlpStyle to IltClassLegend, IltObjectLegend and IltLegend for compatibility This method also defined the search strategy that will be used by the style instance to look for a key value.
protected  IlpStyle prepareBizAttributeStyle(IlpStyleContext styleContext, IlpStyle style)
          Deprecated. Updates automatically created settings and default styles for a new attribute style.
protected  IlpStyle prepareBizClassStyle(IlpStyleContext styleContext, IlpStyle style)
          Deprecated. Updates automatically created settings and default styles for a new IlpClass style.
protected  IlpStyle prepareBizObjectStyle(IlpStyleContext instanceContext, IlpStyle style)
          Deprecated. Updates automatically created settings and default styles for a new IlpObject style.
protected  IlpStyle prepareGraphicViewStyle(IlpStyleContext instanceContext, IlpStyle style)
          Deprecated. Prepares the graphic view style.
protected  IlpStyle prepareJavaClassStyle(IlpStyleContext styleContext, IlpStyle style)
          Deprecated. Updates automatically created settings and default styles for a new Java class style.
protected  IlpStyle prepareNamedStyle(IlpStyleContext styleContext, IlpStyle style)
          Deprecated. Updates automatically created settings and default styles for a new Named style.
protected  IlpStyle prepareROAttributeStyle(IlpStyleContext instanceContext, IlpStyle style)
          Deprecated. Prepares the style for an attribute in a representation object
protected  IlpStyle prepareROStyle(IlpStyleContext instanceContext, IlpStyle style)
          Deprecated. Prepares the representation object style.
protected  IlpStyle prepareStyle(IlpStyle style, IlpStyleContext styleContext)
          Deprecated. Creates the style hierarchy according to the style category.
 void recustomizeStyles()
          Deprecated. Updates the contents of the styles after the style sheets have changed.
 boolean removeStyle(IlpRepresentationObject ro)
          Deprecated. Remove an instance style from the currently buffered styles.
 
Methods inherited from class ilog.cpl.style.IlpDefaultStyleManager
getStyle, getStyle, getStyle, getStyle, getStyle, getStyleContexts, removeStyle, resetStyles
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ilog.cpl.style.IlpStyleManager
getStyle, getStyle, getStyle, getStyle, getStyle, getStyleContexts, removeStyle, resetStyles
 

Constructor Detail

IlpDefaultGraphicViewStyleManager

public IlpDefaultGraphicViewStyleManager(IlpContext context,
                                         IlpGraphicView graphicView)
Deprecated. 
Creates a default graphic view style manager, based on the given context and to be used by the given graphic view.

Parameters:
context - Context.
graphicView - Graphic view.
Method Detail

getDefaultStyleManager

public IlpStyleManager getDefaultStyleManager()
Deprecated. 
Returns the default style manager used by this configuration.

Specified by:
getDefaultStyleManager in interface IlpGraphicViewStyleManager

getView

public IlpGraphicView getView()
Deprecated. 
Returns the graphic view which is using this configuration.


cleanup

public void cleanup()
Deprecated. 
Forces the Style Manager to clean up unnecessary styles, or styles that correspond to objects that are no longer needed by the application.

This method cleans up instance styles, mainly styles which are only removed when the objects are garbage collected.

Specified by:
cleanup in interface IlpStyleManager
Overrides:
cleanup in class IlpDefaultStyleManager
Since:
JTGO 3.1
Internal method or field: do not use!

getStyle

public IlpStyle getStyle()
Deprecated. 
Returns the style specified for this view. If no style was specifically set, a default style will be returned.

Specified by:
getStyle in interface IlpGraphicViewStyleManager
Returns:
Graphic view style for this view.

getStyle

public IlpStyle getStyle(IlpAttribute attribute)
Deprecated. 
Gets a style by attribute. If the style does not exist it will be created. When retrieving an attribute style, the IlpClass linked in the attribute will be used.

The following default styles are set for an attribute style:

  1. The style for the attribute value class (and thereby also the value class parents)
  2. The style for the IlpAttribute Java class
The style for the IlpClass containing the attribute is NOT automatically added as a default style.

A style cannot be retrieved for a custom attribute that does not belong to an IlpClass.

Specified by:
getStyle in interface IlpStyleManager
Overrides:
getStyle in class IlpDefaultStyleManager
Parameters:
attribute - The IlpAttribute of the style.
Returns:
The requested style or null if it was impossible to get or create the style.
Since:
JTGO 3.5
Internal method or field: do not use!

getStyle

public IlpStyle getStyle(IlpAttribute attribute,
                         IlpClass clazz)
Deprecated. 
Gets a style by attribute. If the style does not exist it will be created. The IlpClass parameter must be the class where the attribute was declared or one of its subclasses. Otherwise, this method returns null.

If the given class corresponds to the IlpClass where the attribute was declared, the resulting style will have the following default styles :

  1. The style for the attribute value class (and thereby also the value class parents)
  2. The style for the IlpAttribute Java class

If the given class is a subclass of the IlpClass where the attribute was declared, the resulting style will have the following default styles:

  1. The style for the attribute in the IlpClass superclass.
A style cannot be retrieved for a custom attribute that does not belong to an IlpClass.

Specified by:
getStyle in interface IlpStyleManager
Overrides:
getStyle in class IlpDefaultStyleManager
Parameters:
attribute - The IlpAttribute of the style.
clazz - The IlpClass where the style was declared or one of its subclasses.
Returns:
The requested style or null if it was impossible to get or create the style.
Since:
JTGO 3.5
Internal method or field: do not use!

getStyle

public IlpStyle getStyle(IlpRepresentationObject ro)
Deprecated. 
Return the correct style for this representation object. If no style is defined for this instance, a default style will be returned.

The style created for the given representation object will contain a list of pre-defined default styles, which are listed below:

Specified by:
getStyle in interface IlpGraphicViewStyleManager
Parameters:
ro - Representation object.
Returns:
Style for given representation object.

getStyle

public IlpStyle getStyle(IlpRepresentationObject ro,
                         IlpAttribute attribute)
Deprecated. 
Return the correct style for this representation object. If no style is defined for this instance, a default style will be returned.

The style created for the given attribute in the representation object contains a pre-defined default style:

If the attribute is not defined in a business object class, this style contains

Specified by:
getStyle in interface IlpGraphicViewStyleManager
Parameters:
ro - Representation object.
attribute - Attribute linked to representation object.
Returns:
Style for given representation object.

removeStyle

public boolean removeStyle(IlpRepresentationObject ro)
Deprecated. 
Remove an instance style from the currently buffered styles. If a style is not removable, the method will return false.

Specified by:
removeStyle in interface IlpGraphicViewStyleManager
Parameters:
ro - The representation object that is associated to this style
Returns:
Boolean indicating whether the style was removed.

getExistingStyle

public IlpStyle getExistingStyle(IlpStyleContext styleContext)
Deprecated. 
Gets a style by style context.

Specified by:
getExistingStyle in interface IlpStyleManager
Overrides:
getExistingStyle in class IlpDefaultStyleManager
Parameters:
styleContext - The style context
Returns:
the style if it is already present in this manager or null if the style does not yet exist.

NOTE: The style returned by this method must not be modified.

Since:
JTGO 3.1

prepareStyle

protected IlpStyle prepareStyle(IlpStyle style,
                                IlpStyleContext styleContext)
Deprecated. 
Creates the style hierarchy according to the style category.

Overrides:
prepareStyle in class IlpDefaultStyleManager
Internal method or field: do not use!

prepareNamedStyle

protected IlpStyle prepareNamedStyle(IlpStyleContext styleContext,
                                     IlpStyle style)
Deprecated. 
Updates automatically created settings and default styles for a new Named style.

The following default styles are set for a Java class style:

  1. The named style defined in the default style manager.

Internal method or field: do not use!

prepareJavaClassStyle

protected IlpStyle prepareJavaClassStyle(IlpStyleContext styleContext,
                                         IlpStyle style)
Deprecated. 
Updates automatically created settings and default styles for a new Java class style.

The following default styles are set for a Java class style:

  1. The style for the parent class of the Java class (and thereby also its superclasses, if any).
  2. If the class is an IlpRepresentationObject, styles for this interface and subinterfaces are also added.
If the class is not an IlpRepresentationObject, no interface styles are added as defaults.

Overrides:
prepareJavaClassStyle in class IlpDefaultStyleManager
Internal method or field: do not use!

prepareBizClassStyle

protected IlpStyle prepareBizClassStyle(IlpStyleContext styleContext,
                                        IlpStyle style)
Deprecated. 
Updates automatically created settings and default styles for a new IlpClass style.

The following default styles are set for an IlpClass style:

  1. The style for the super class of the IlpClass (and thereby also its superclasses, if any).

Overrides:
prepareBizClassStyle in class IlpDefaultStyleManager
Internal method or field: do not use!

prepareBizAttributeStyle

protected IlpStyle prepareBizAttributeStyle(IlpStyleContext styleContext,
                                            IlpStyle style)
Deprecated. 
Updates automatically created settings and default styles for a new attribute style.

The following default styles are set for an attribute style:

  1. The style for the attribute value class (and thereby also the value class parents)
The style for the IlpClass containing the attribute is NOT automatically added as a default style.

Overrides:
prepareBizAttributeStyle in class IlpDefaultStyleManager
Internal method or field: do not use!

prepareBizObjectStyle

protected IlpStyle prepareBizObjectStyle(IlpStyleContext instanceContext,
                                         IlpStyle style)
Deprecated. 
Updates automatically created settings and default styles for a new IlpObject style.

The following default styles are set for an IlpObject style:

  1. IlpClass style (and thereby also the IlpClass parents)

Overrides:
prepareBizObjectStyle in class IlpDefaultStyleManager
Internal method or field: do not use!

prepareROStyle

protected IlpStyle prepareROStyle(IlpStyleContext instanceContext,
                                  IlpStyle style)
Deprecated. 
Prepares the representation object style.

Internal method or field: do not use!

prepareROAttributeStyle

protected IlpStyle prepareROAttributeStyle(IlpStyleContext instanceContext,
                                           IlpStyle style)
Deprecated. 
Prepares the style for an attribute in a representation object

Internal method or field: do not use!

prepareGraphicViewStyle

protected IlpStyle prepareGraphicViewStyle(IlpStyleContext instanceContext,
                                           IlpStyle style)
Deprecated. 
Prepares the graphic view style.

Internal method or field: do not use!

postCreateStyle

protected IlpStyle postCreateStyle(IlpStyle original,
                                   IlpStyleContext styleContext)
Deprecated. 
This method changes the given style, if this is a style for JTGO - because we need to transform an IlpStyle to IltClassLegend, IltObjectLegend and IltLegend for compatibility This method also defined the search strategy that will be used by the style instance to look for a key value.

Overrides:
postCreateStyle in class IlpDefaultStyleManager
Returns:
the new style, if it was changed, to the original one.
Internal method or field: do not use!

recustomizeStyles

public void recustomizeStyles()
Deprecated. 
Updates the contents of the styles after the style sheets have changed.

Specified by:
recustomizeStyles in interface IlpStyleManager
Overrides:
recustomizeStyles in class IlpDefaultStyleManager
Since:
JTGO 3.5


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.