com.tensegrity.gui.swing.control.preview
Interface Preview

All Known Implementing Classes:
AbstractPreview

public interface Preview

Covers the basic behavior of a preview component. It defines methods to set format instances respectively to get their current values.

While you can retrieve each single value from a format (for example: getFontColor(), getFontFamily(), getPaintColorfore(), getStrokeWeight()) you have to set formats giving their complete set of parameters (for example: setFontFormat(int, int, String, int, boolean, boolean, boolean, StrokeFormat, StrokeFormat).

Version:
$Id: Preview.java,v 1.12 2006/01/05 12:34:35 BurkhardWick Exp $
Author:
Gilles Iachelini
See Also:
StrokeFormat, PaintFormat, FontFormat

Method Summary
 int getFontColor()
          Method getFontColor returns the color of the currently previewed font.
 java.lang.String getFontFamily()
          Method getFontFamily returns the name of the currently previewed font.
 boolean getFontItalic()
          Method getFontItalic returns the flag that indicates that the previewed font is italic.
 int getFontSize()
          Method getFontSize returns the size of the currently previewed font.
 boolean getFontStrikethrough()
          Method getFontStrikethrough returns the flag that indicates that the previewed font is strikethrough.
 boolean getFontUnderline()
          Method getFontUnderline returns the flag that indicates that the previewed font is underlined.
 int getFontWeight()
          Method getFontWeight returns the weight of the currently previewed font.
 int getPaintColorback()
          Method getPaintColorback returns the current background color of the previewed paint.
 int getPaintColorfore()
          Method getPaintColorfore returns the current foreground color of the previewed paint.
 int getPaintGradientType()
          Method getPaintGradientType returns the gradient type as int.
 int getPaintPatternType()
          Method getPaintPatternType returns pattern type as int.
 int getPaintStyle()
          Method getPaintStyle returns the current style of the previewed paint.
 java.lang.String getPaintTextureKey()
          Returns the texture raster key that is used to get the raster from the pool.
 int getPaintTransparency()
          Method getPaintTransparency returns the level of transparency as an int between zero and 100.
 boolean getPaintTransparent()
          Method getPaintTransparent returns the flag that indicates whether to use transparency.
 int getStrokeColor()
          Method getStrokeColor returns the current color of the previewed stroke.
 int getStrokeStyle()
          Method getStrokeStyle returns the current style of the previewed stroke.
 int getStrokeWeight()
          Method getStrokeWeight returns the current weight of the previewed stroke.
 void setFontFormat(int fontSize, int fontWeight, java.lang.String fontFamily, int fontColor, boolean fontItalic, boolean fontUnderline, boolean fontStrikethrough, StrokeFormat underlineStroke, StrokeFormat strikethroughStroke)
          Method setFontFormat sets all font relevant values.
 void setPaintFormat(int paintStyle, int paintColorback, int paintColorfore, int paintGradienttype, int paintPatterntype, java.lang.String paintRasterKey, int paintTransparency, boolean paintTransparent)
          Method setPaintFormat sets all PaintFormat relevant values.
 void setStrokeFormat(int strokeStyle, int strokeWeight, int strokeColor, double[] strokePattern)
          Method setStrokeFormat sets all stroke related values.
 

Method Detail

getStrokeStyle

public int getStrokeStyle()
Method getStrokeStyle returns the current style of the previewed stroke.

Returns:
int the style as int.
See Also:
StrokeFormat

getStrokeWeight

public int getStrokeWeight()
Method getStrokeWeight returns the current weight of the previewed stroke.

Returns:
int the weight as int.
See Also:
StrokeFormat

getStrokeColor

public int getStrokeColor()
Method getStrokeColor returns the current color of the previewed stroke.

Returns:
int the color as rgb int.
See Also:
StrokeFormat

setStrokeFormat

public void setStrokeFormat(int strokeStyle,
                            int strokeWeight,
                            int strokeColor,
                            double[] strokePattern)
Method setStrokeFormat sets all stroke related values.

Parameters:
strokeStyle - the style as int.
strokeWeight - the weight as int.
strokeColor - the color as int.
strokePattern - the pattern as double array
See Also:
StrokeFormat

getPaintStyle

public int getPaintStyle()
Method getPaintStyle returns the current style of the previewed paint.

Returns:
int the style as int.
See Also:
PaintFormat

getPaintColorback

public int getPaintColorback()
Method getPaintColorback returns the current background color of the previewed paint.

Returns:
int the style as int.
See Also:
PaintFormat

getPaintColorfore

public int getPaintColorfore()
Method getPaintColorfore returns the current foreground color of the previewed paint.

Returns:
int the color as rgb int.
See Also:
PaintFormat

getPaintGradientType

public int getPaintGradientType()
Method getPaintGradientType returns the gradient type as int.

Returns:
int the gradient type.
See Also:
PaintFormat

getPaintPatternType

public int getPaintPatternType()
Method getPaintPatternType returns pattern type as int.

Returns:
int the pattern type as int.
See Also:
PaintFormat

getPaintTransparency

public int getPaintTransparency()
Method getPaintTransparency returns the level of transparency as an int between zero and 100.

Returns:
int the level of transparency.
See Also:
PaintFormat

getPaintTextureKey

public java.lang.String getPaintTextureKey()
Returns the texture raster key that is used to get the raster from the pool.

Returns:
the texture raster key that is used to get the raster from the pool.
See Also:
PaintFormat

getPaintTransparent

public boolean getPaintTransparent()
Method getPaintTransparent returns the flag that indicates whether to use transparency.

Returns:
boolean true, if the paint uses transparency, otherwise false.
See Also:
PaintFormat

setPaintFormat

public void setPaintFormat(int paintStyle,
                           int paintColorback,
                           int paintColorfore,
                           int paintGradienttype,
                           int paintPatterntype,
                           java.lang.String paintRasterKey,
                           int paintTransparency,
                           boolean paintTransparent)
Method setPaintFormat sets all PaintFormat relevant values.

Parameters:
paintStyle - the style.
paintColorback - the background color as rgb int.
paintColorfore - the foregound color as rgb int.
paintGradienttype - the gradient type.
paintPatterntype - the pattern type.
paintRasterKey - the texture raster key.
paintTransparency - the level of transparency.
paintTransparent - the transparent flag.
See Also:
PaintFormat

getFontSize

public int getFontSize()
Method getFontSize returns the size of the currently previewed font.

Returns:
int the size as int.
See Also:
FontFormat

getFontWeight

public int getFontWeight()
Method getFontWeight returns the weight of the currently previewed font.

Returns:
int the weight as int.
See Also:
FontFormat

getFontFamily

public java.lang.String getFontFamily()
Method getFontFamily returns the name of the currently previewed font.

Returns:
String the name of the font.
See Also:
FontFormat

getFontColor

public int getFontColor()
Method getFontColor returns the color of the currently previewed font.

Returns:
int the color as rgb int.
See Also:
FontFormat

getFontItalic

public boolean getFontItalic()
Method getFontItalic returns the flag that indicates that the previewed font is italic.

Returns:
boolean true, if the font is italic, otherwise false.
See Also:
FontFormat

getFontUnderline

public boolean getFontUnderline()
Method getFontUnderline returns the flag that indicates that the previewed font is underlined.

Returns:
boolean true, if the font is underlined, otherwise false.
See Also:
FontFormat

getFontStrikethrough

public boolean getFontStrikethrough()
Method getFontStrikethrough returns the flag that indicates that the previewed font is strikethrough.

Returns:
boolean true, if the font is strikethrough, otherwise false.
See Also:
FontFormat

setFontFormat

public void setFontFormat(int fontSize,
                          int fontWeight,
                          java.lang.String fontFamily,
                          int fontColor,
                          boolean fontItalic,
                          boolean fontUnderline,
                          boolean fontStrikethrough,
                          StrokeFormat underlineStroke,
                          StrokeFormat strikethroughStroke)
Method setFontFormat sets all font relevant values.

Parameters:
fontSize - the size as int.
fontWeight - the weight as int.
fontFamily - the name of the font family as String.
fontColor - the color as rgb int.
fontItalic - the flag that indicates italic.
fontUnderline - the flag that indicates underline.
fontStrikethrough - the flag that indicates strikethrough.
See Also:
FontFormat


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.