TPTP 4.6.0 Platform Project
Internal API Specification

org.eclipse.tptp.platform.report.drawutil.internal
Class SWTDStyle

java.lang.Object
  extended by org.eclipse.tptp.platform.report.drawutil.internal.SWTDStyle
All Implemented Interfaces:
IDisposable

Deprecated. As of TPTP 4.5.0, use the TPTP Business Intelligence and Reporting Tools (BIRT) reporting infrastructure (org.eclipse.tptp.platform.report.birt).

public class SWTDStyle
extends java.lang.Object
implements IDisposable

This class is made to transform any IDStyle applied on a IDItem, to a valid style suitable for SWT widget/drawings.


Nested Class Summary
static class SWTDStyle.SColor
          Deprecated. Because getColor() may return a system's default color, the user MUST not dispose.
static class SWTDStyle.SFont
          Deprecated. Because getFont() may return a system's default font, the user MUST not dispose.
 
Field Summary
protected  org.eclipse.swt.graphics.Color back_
          Deprecated. style's current back color
protected  boolean dispose_back_
          Deprecated.  
protected  boolean dispose_font_
          Deprecated.  
protected  boolean dispose_fore_
          Deprecated.  
protected  org.eclipse.swt.graphics.Font font_
          Deprecated. style's current font
protected  int font_style_
          Deprecated.  
protected  org.eclipse.swt.graphics.Color fore_
          Deprecated. style's current fore color
 
Constructor Summary
SWTDStyle(org.eclipse.swt.graphics.Device _dev)
          Deprecated. Create default style.
SWTDStyle(org.eclipse.swt.graphics.Device _dev, float font_scale)
          Deprecated. Create default style.
SWTDStyle(org.eclipse.swt.graphics.Device dev, IDItem _item)
          Deprecated. Create a style from given IDItem, same result as calling styleOf(item).
SWTDStyle(org.eclipse.swt.graphics.Device dev, IDItem _item, float font_scale)
          Deprecated. Create a style from given IDItem, same result as calling styleOf(item).
 
Method Summary
 void dispose()
          Deprecated. Call this to dispose color and fonts allocated by this object.
 org.eclipse.swt.graphics.Color getBack()
          Deprecated.  
static SWTDStyle.SColor getBackColor(org.eclipse.swt.graphics.Device _swt_device, IDItem _item)
          Deprecated.  
static SWTDStyle.SColor getColor(org.eclipse.swt.graphics.Device _swt_device, IDColor _jscrib_color)
          Deprecated. Equivalent to getColor( _swt_device, _jscrib_color, null );
static SWTDStyle.SColor getColor(org.eclipse.swt.graphics.Device _swt_device, IDColor _jscrib_color, SWTDStyle.SColor _scolor)
          Deprecated. Convert a jscrib IDColor to a swt Color.
static int getColorComponent(int jscrib_color_component)
          Deprecated. Convert an jscrib component color range to a valid SWT Color range [0..255].
static org.eclipse.swt.graphics.Color getDefaultBack(org.eclipse.swt.graphics.Device dev_)
          Deprecated.  
static org.eclipse.swt.graphics.Font getDefaultFont(org.eclipse.swt.graphics.Device dev_, float font_scale)
          Deprecated.  
static org.eclipse.swt.graphics.Color getDefaultFore(org.eclipse.swt.graphics.Device dev_)
          Deprecated.  
 org.eclipse.swt.graphics.Font getFont()
          Deprecated.  
static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device, IDFont _jscrib_font)
          Deprecated. Equivalent to getFont( _swt_device, _jscrib_font, null );
static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device, IDFont _jscrib_font, float _font_scale, SWTDStyle.SFont _sfont)
          Deprecated. Convert a jscrib font to SWT one.
static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device, IDFont _jscrib_font, SWTDStyle.SFont _sfont)
          Deprecated.  
static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device, IDItem _item)
          Deprecated.  
static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device, IDItem _item, float font_scale)
          Deprecated.  
static IDFont getFont(IDItem _item)
          Deprecated.  
 int getFontStyle()
          Deprecated.  
 org.eclipse.swt.graphics.Color getFore()
          Deprecated.  
static SWTDStyle.SColor getForeColor(org.eclipse.swt.graphics.Device _swt_device, IDItem _item)
          Deprecated.  
 void styleOf(org.eclipse.swt.graphics.Device _swt_device, IDItem _item)
          Deprecated.  
 void styleOf(org.eclipse.swt.graphics.Device _swt_device, IDItem _item, float font_scale)
          Deprecated. Dispose current style and change this SWTDStyle with style collected from given IDItem.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

font_

protected org.eclipse.swt.graphics.Font font_
Deprecated. 
style's current font


fore_

protected org.eclipse.swt.graphics.Color fore_
Deprecated. 
style's current fore color


back_

protected org.eclipse.swt.graphics.Color back_
Deprecated. 
style's current back color


dispose_font_

protected boolean dispose_font_
Deprecated. 

dispose_back_

protected boolean dispose_back_
Deprecated. 

dispose_fore_

protected boolean dispose_fore_
Deprecated. 

font_style_

protected int font_style_
Deprecated. 
Constructor Detail

SWTDStyle

public SWTDStyle(org.eclipse.swt.graphics.Device _dev)
Deprecated. 
Create default style. This is your responsability to call dispose() method.


SWTDStyle

public SWTDStyle(org.eclipse.swt.graphics.Device _dev,
                 float font_scale)
Deprecated. 
Create default style. This is your responsability to call dispose() method.


SWTDStyle

public SWTDStyle(org.eclipse.swt.graphics.Device dev,
                 IDItem _item)
Deprecated. 
Create a style from given IDItem, same result as calling styleOf(item). This is your responsability to call dispose() method.


SWTDStyle

public SWTDStyle(org.eclipse.swt.graphics.Device dev,
                 IDItem _item,
                 float font_scale)
Deprecated. 
Create a style from given IDItem, same result as calling styleOf(item). This is your responsability to call dispose() method.

Method Detail

dispose

public void dispose()
Deprecated. 
Call this to dispose color and fonts allocated by this object. You need to do this to assure SWT requirement.

Specified by:
dispose in interface IDisposable

getFont

public org.eclipse.swt.graphics.Font getFont()
Deprecated. 
Returns:
font of this style.

getFore

public org.eclipse.swt.graphics.Color getFore()
Deprecated. 
Returns:
fore color of this style.

getBack

public org.eclipse.swt.graphics.Color getBack()
Deprecated. 
Returns:
back color of this style.

getFontStyle

public int getFontStyle()
Deprecated. 
Returns:
font style including UNDERLINE,DASHED,... all that Font can't handle.

getDefaultFore

public static org.eclipse.swt.graphics.Color getDefaultFore(org.eclipse.swt.graphics.Device dev_)
Deprecated. 
Returns:
the default fore ground color (black). This color MUST not be disposed.

getDefaultBack

public static org.eclipse.swt.graphics.Color getDefaultBack(org.eclipse.swt.graphics.Device dev_)
Deprecated. 
Returns:
the default back ground color (white). This color MUST not be disposed.

getDefaultFont

public static org.eclipse.swt.graphics.Font getDefaultFont(org.eclipse.swt.graphics.Device dev_,
                                                           float font_scale)
Deprecated. 
Returns:
default font (as provided but swt Display). This font MUST not be disposed.

styleOf

public void styleOf(org.eclipse.swt.graphics.Device _swt_device,
                    IDItem _item,
                    float font_scale)
Deprecated. 
Dispose current style and change this SWTDStyle with style collected from given IDItem. DStyle for item is retrieved walking upstair in tree from _item to try to find complete style. On top level node, complete style by defaults. The contract is after this, SWTDStyle have non null two colors and fonts . The parameter scale_font is float value 0..+oo which you can obtain a font bigger or lower that the original font. Use for zoom feature.


styleOf

public void styleOf(org.eclipse.swt.graphics.Device _swt_device,
                    IDItem _item)
Deprecated. 

getFont

public static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device,
                                      IDFont _jscrib_font,
                                      float _font_scale,
                                      SWTDStyle.SFont _sfont)
Deprecated. 
Convert a jscrib font to SWT one.

Parameters:
_swt_device - the devie used to create font
_jscrib_font - the font to convert
_font_scale - zoom average for the font
_sfont - reuse this object rather than allocate a new one.
Returns:
a SWT Font object, dispose is under the responsability of the caller of this method. if _scrib_font is null, return the default font.

getFont

public static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device,
                                      IDFont _jscrib_font,
                                      SWTDStyle.SFont _sfont)
Deprecated. 

getFont

public static final SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device,
                                            IDFont _jscrib_font)
Deprecated. 
Equivalent to getFont( _swt_device, _jscrib_font, null );


getColorComponent

public static int getColorComponent(int jscrib_color_component)
Deprecated. 
Convert an jscrib component color range to a valid SWT Color range [0..255].

Returns:
a value in range 0..255.

getColor

public static SWTDStyle.SColor getColor(org.eclipse.swt.graphics.Device _swt_device,
                                        IDColor _jscrib_color,
                                        SWTDStyle.SColor _scolor)
Deprecated. 
Convert a jscrib IDColor to a swt Color. A system color can be returned.

Parameters:
_swt_device - the device used to create color.
_jscrib_color - the color to convert.
_scolor - reuse this object rather than allocate a new SColor instance.
Returns:
a new allocated SWT Color, or getDefaultFore().

getColor

public static SWTDStyle.SColor getColor(org.eclipse.swt.graphics.Device _swt_device,
                                        IDColor _jscrib_color)
Deprecated. 
Equivalent to getColor( _swt_device, _jscrib_color, null );


getForeColor

public static SWTDStyle.SColor getForeColor(org.eclipse.swt.graphics.Device _swt_device,
                                            IDItem _item)
Deprecated. 
Returns:
the foreground color use by item or one of its parent, or default foreground. Do not forget to call .dispose() on returned color. If you wan to get fore, back color and font prefer to use SWTDStyle instand of the method.

getBackColor

public static SWTDStyle.SColor getBackColor(org.eclipse.swt.graphics.Device _swt_device,
                                            IDItem _item)
Deprecated. 
Returns:
the background color use by item or one of its parent, or default background. Do not forget to call .dispose() on returned color. If you wan to get fore, back color and font prefer to use SWTDStyle instand of the method.

getFont

public static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device,
                                      IDItem _item,
                                      float font_scale)
Deprecated. 
Returns:
the inherited font by a style on the item or a style applied on a parent

getFont

public static SWTDStyle.SFont getFont(org.eclipse.swt.graphics.Device _swt_device,
                                      IDItem _item)
Deprecated. 
Returns:
the inherited font by a style on the item or a style applied on a parent

getFont

public static IDFont getFont(IDItem _item)
Deprecated. 
Returns:
the inherited font by a style on the item or a style applied on a parent.

TPTP 4.6.0 Platform Project
Internal API Specification