ilog.cpl.style
Class IlpDefaultStyleManager

java.lang.Object
  extended by ilog.cpl.style.IlpDefaultStyleManager
All Implemented Interfaces:
IlpStyleManager
Direct Known Subclasses:
IlpDefaultGraphicViewStyleManager

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

public class IlpDefaultStyleManager
extends Object
implements IlpStyleManager

Default implementation of the style manager interface.

Since:
JTGO 3.0
Deprecated Since:
JTGO 3.5

Field Summary
protected  IlpContext context
          Deprecated. Context
protected static Set JAVACLASS_STYLES_BLACK_LIST
          Deprecated.  
protected  ilog.cpl.style.internal.IlpStyleMap styles
          Deprecated. Style cache IlpStyleContext->IlpStyle
protected  Collection stylesInProgress
          Deprecated. Logger for local access
 
Constructor Summary
IlpDefaultStyleManager()
          Deprecated. IlpDefaultStyleManager constructor.
IlpDefaultStyleManager(IlpContext context)
          Deprecated. IlpDefaultStyleManager constructor.
 
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.
 IlpStyle getExistingStyle(IlpStyleContext styleContext)
          Deprecated. Gets a style by style context.
 IlpStyle getStyle(Class clazz)
          Deprecated. Gets a style by Java class.
 IlpStyle getStyle(IlpAttribute attribute)
          Deprecated. Gets a style by attribute.
 IlpStyle getStyle(IlpAttribute attribute, IlpClass clazz)
          Deprecated. Gets a style by attribute.
 IlpStyle getStyle(IlpClass clazz)
          Deprecated. Gets a style by IlpClass.
 IlpStyle getStyle(IlpObject object)
          Deprecated. Gets a style by IlpObject.
 IlpStyle getStyle(IlpStyleContext styleContext)
          Deprecated. Gets a style by style context.
 IlpStyle getStyle(String name)
          Deprecated. Gets a style by name.
 List getStyleContexts()
          Deprecated. Gets a list of all style contexts for available styles.
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
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 prepareJavaClassStyle(IlpStyleContext styleContext, IlpStyle style)
          Deprecated. Updates automatically created settings and default styles for a new Java class style.
protected  IlpStyle prepareStyle(IlpStyle style, IlpStyleContext styleContext)
          Deprecated. Creates the style hierarchy for shared styles according to its category.
 void recustomizeStyles()
          Deprecated. Updates the contents of the styles after the style sheets have changed.
 boolean removeStyle(IlpStyleContext id)
          Deprecated. Removes a style from the currently buffered styles.
 void resetStyles()
          Deprecated. Cleans the contents of all currently buffered styles.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

context

protected IlpContext context
Deprecated. 
Context

Internal method or field: do not use!

styles

protected ilog.cpl.style.internal.IlpStyleMap styles
Deprecated. 
Style cache IlpStyleContext->IlpStyle

Internal method or field: do not use!

stylesInProgress

protected Collection stylesInProgress
Deprecated. 
Logger for local access

Internal method or field: do not use!

JAVACLASS_STYLES_BLACK_LIST

protected static final Set JAVACLASS_STYLES_BLACK_LIST
Deprecated. 
Internal method or field: do not use!
Constructor Detail

IlpDefaultStyleManager

public IlpDefaultStyleManager()
Deprecated. 
IlpDefaultStyleManager constructor. The service context used is the default retrieved from IlpSystem. The style service to be used is retrieved from the service context.


IlpDefaultStyleManager

public IlpDefaultStyleManager(IlpContext context)
Deprecated. 
IlpDefaultStyleManager constructor.

Parameters:
context - Service context.
Method Detail

getStyle

public IlpStyle getStyle(String name)
Deprecated. 
Gets a style by name. If the style does not exist it will be created. Named styles are created without any default styles.

Specified by:
getStyle in interface IlpStyleManager
Parameters:
name - Name of style to retrieve.
Returns:
The requested style or null if it was impossible to get or create the style.

getStyle

public IlpStyle getStyle(IlpClass clazz)
Deprecated. 
Gets a style by IlpClass. If the style does not exist it will be created.

The following default styles are set for an IlpClass style:

  1. The style for the superclass of the IlpClass (and therefore also its superclasses, if any).
  2. The style for the IlpClass Java class, when there is no superclass defined.

Specified by:
getStyle in interface IlpStyleManager
Parameters:
clazz - IlpClass of style.
Returns:
The requested style or null if it was impossible to get or create the style.

getStyle

public IlpStyle getStyle(IlpObject object)
Deprecated. 
Gets a style by IlpObject. If the style does not exist it will be created.

The following default styles are set for an IlpObject style:

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

Specified by:
getStyle in interface IlpStyleManager
Parameters:
object - The IlpObject of the style.
Returns:
The requested style or null if it was impossible to get or create the style.

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
Parameters:
attribute - The IlpAttribute of the style.
Returns:
The requested style or null if it was impossible to get or create the style.

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
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.

getStyle

public IlpStyle getStyle(Class clazz)
Deprecated. 
Gets a style by Java class. If the style does not exist it will be created.

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.

Specified by:
getStyle in interface IlpStyleManager
Parameters:
clazz - The class of the style.
Returns:
The requested style or null if it was impossible to get or create the style.

getExistingStyle

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

Specified by:
getExistingStyle in interface IlpStyleManager
Parameters:
styleContext - The identifier of the style.
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.


getStyle

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

If the style does not exist, it will be created. A style may be created with certain default styles automatically added, depending on the style type.

For details, see the getStyle method for the corresponding style type.

Specified by:
getStyle in interface IlpStyleManager
Parameters:
styleContext - The style context of the style.
Returns:
The requested style or null if it was impossible to get or create the style.

removeStyle

public boolean removeStyle(IlpStyleContext id)
Deprecated. 
Removes a style from the currently buffered styles. Only instance styles and named styles can be removed. If a style is not removable, the method will return false.

Specified by:
removeStyle in interface IlpStyleManager
Parameters:
id - The style context indentifying the style.
Returns:
Boolean indicating whether the style was removed.

getStyleContexts

public List getStyleContexts()
Deprecated. 
Gets a list of all style contexts for available styles.

Specified by:
getStyleContexts in interface IlpStyleManager
Returns:
List of IlpStyleContexts for all available styles.

resetStyles

public void resetStyles()
Deprecated. 
Cleans the contents of all currently buffered styles.

Style keys which are used by other styles, outside this style manager, are not removed.

Specified by:
resetStyles in interface IlpStyleManager
See Also:
IlpStyle.resetValues()

recustomizeStyles

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

Specified by:
recustomizeStyles in interface IlpStyleManager
Since:
JTGO 3.5

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
Since:
JTGO 3.1

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

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

prepareStyle

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

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)

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.

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).

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.

Internal method or field: do not use!


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