Styling management evolution among versions

Article ID: 2140
Last updated: 29 May, 2018
Article ID: 2140
Last updated: 29 May, 2018
Revision: 3
Views: 437
Posted: 28 Jun, 2010
by Dean J.
Updated: 29 May, 2018
by Gargani A.

Question

What styling mechanism should I use in place of the methods that have been marked deprecated in the IltObject class?

Answer

In old JTGO 3.0 and 3.1 versions, the previously called object legends have been replaced by styles managed by a Style Manager.
The following methods, which access information from the object legend, have been replaced by calls performed directly through the Style API using the required style key.

Starting with JTGO 3.5, the styling mechanism has been replaced by the cascading style sheets (CSS) mechanism.
The CSS are applied to the graphic component itself acting as the styling manager.

 
Old Styling mecahnism applying to IltObject 3.0 and 3.1
 
CSS mechanism starting with 3.5

public static IltLegend GetClassLegend ()

In ILOG JTGO 3.0 and 3.1, you can use IlpStyleManager to retrieve the appropriate style for this IlpClass. For example,

yourIlpStyleManager.getStyle(yourIltObject.GetIlpClass ());


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files. In this case, the graphic component acts as the styling manager that handles the styles currently used. To modify the graphic properties for a given business class, you should load a new style sheet directly in the graphic component using the method yourComponent.setStyleSheets (cssfiles);

public IltLegend getLegend ()

In ILOG JTGO 3.0 and 3.1, you can use IlpStyleManager to retrieve the appropriate style for the IlpObject in question. For example,

yourIlpStyleManager.getStyle(yourIltObject);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files. In this case, the graphic component acts as the styling manager that handles the styles currently used. To modify the graphic properties for a given business object, you should load a new style sheet directly in the graphic component using the method yourComponent.setStyleSheets (cssfiles)

public int getLabelPosition (IltGraphicManager manager)

See IltObject.getLabelPosition ().

public IlvPoint getLabelOffset (IltGraphicManager manager)

See IltObject.getLabelOffset ().

public int getLabelPosition (IltGraphic graphic)

See IltObject.getLabelPosition ().

public IlvPoint getLabelOffset (IltGraphic graphic)

See IltObject.getLabelOffset ().

public void setLabelPosition (IltGraphicManager manager, int position)

See IltObject.setLabelPosition (int position).

public void setLabelOffset (IltGraphicManager manager, IlvPoint offset)

See IltObject.setLabelOffset (IlvPoint offset).

public void resetLabelPosition (IltGraphicManager manager)

See IltObject.resetLabelPosition ().

public void resetLabelOffset (IltGraphicManager manager)

See IltObject.resetLabelOffset ().

public int getLabelPosition ()

In ILOG JTGO 3.0 and 3.1, you can get the label position from the object style with the key IltObject.LabelPosition. For example,

IlpStyle yourStyle = yourIlpStyleManager.getStyle(yourIltObject); Integer position = (Integer)yourStyle.getInteger(IltObject.LabelPosition);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files. To have access to a given style, you need to provide a custom graphic renderer that implements IlpGraphicRenderer. You can use its IlpGraphicRendererContext to get the style values.

You can use the CSS labelPosition property to get this value.


public IlvPoint getLabelOffset ()

In ILOG JTGO 3.0 and 3.1, you can get the label offset from the object style with the key IltObject.LabelOffset. For example,

IlpStyle yourStyle = yourIlpStyleManager.getStyle(yourIltObject); IlpPoint offset = (IlpPoint)yourStyle.getPoint(IltObject.LabelOffset);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files. To have access to a given style, you need to provide a custom graphic renderer that implements IlpGraphicRenderer. You can use its IlpGraphicRendererContext to get the style values.

You can use the CSS labelOffset property to get this value.


public void setLabelPosition (int position)

In ILOG JTGO 3.0 and 3.1, you can set the label position in the object style with the key IltObject.LabelPosition. For example,

Integer position = new Integer(IlvDirection.Bottom); IlpStyle yourStyle = yourIlpStyleManager.getStyle(yourIltObject); yourStyle.setInteger(IltObject.LabelPosition, position);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files. To have access to a given style, you need to provide a custom graphic renderer that implements IlpGraphicRenderer. You can use its IlpGraphicRendererContext to get the style values.

You can use the CSS labelPosition property to set this value.


public void setLabelOffset (IlvPoint offset)

In ILOG JTGO 3.0 and 3.1, you can set the label offset in the object style with the key IltObject.LabelOffset. For example,

IlpPoint offset = ...; IlpStyle yourStyle = yourIlpStyleManager.getStyle(yourIltObject); yourStyle.setPoint(IltObject.LabelOffset, offset);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files. To have access to a given style, you need to provide a custom graphic renderer that implements IlpGraphicRenderer. You can use its IlpGraphicRendererContext to get the style values.

You can use the CSS labelOffset property to set this value.


public void resetLabelPosition ()

In ILOG JTGO 3.0 and 3.1, you can reset the label position in the object style using the key IltObject.LabelPosition. For example,

yourIlpStyleManager.getStyle(yourIltObject).resetToDefaultValue (IltObject.LabelPosition);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files.

You can use the CSS labelPosition property to set this value.


public void resetLabelOffset ()

In ILOG JTGO 3.0 and 3.1, you can reset the label position in the object style using the key IltObject.LabelOffset. For example,

yourIlpStyleManager.getStyle(yourIltObject).resetToDefaultValue (IltObject.LabelOffset);


Starting with JTGO 3.5, there is no equivalent method, as the styling mechanism is provided through CSS files.

You can use the CSS labelOffset property to set this value.


public void setAutomaticDecorationsDirection (boolean autoDecorationsDirection)

Please use the method IltObject.setAutomaticDecorationsDirection (IlpContext context, boolean automaticDecorationsDirection)

Please refer to the IltObject java documentation for further information about deprecations introduced with the CSS styling mechanism on this class.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 2140
Last updated: 29 May, 2018
Revision: 3
Views: 437
Posted: 28 Jun, 2010 by Dean J.
Updated: 29 May, 2018 by Gargani A.
Also listed in


Others in this category