de.jaret.util.ui.table.renderer
Class DefaultCellStyle

java.lang.Object
  extended by de.jaret.util.misc.PropertyObservableBase
      extended by de.jaret.util.ui.table.renderer.DefaultCellStyle
All Implemented Interfaces:
de.jaret.util.misc.PropertyObservable, ICellStyle

public class DefaultCellStyle
extends de.jaret.util.misc.PropertyObservableBase
implements ICellStyle

Default implementation of ICellStyle.

Version:
$Id: DefaultCellStyle.java 347 2007-04-07 15:01:10Z olk $
Author:
Peter Kliem

Field Summary
protected  org.eclipse.swt.graphics.RGB _backgroundColor
          background color as RGB (no color ressource here).
protected  org.eclipse.swt.graphics.RGB _borderColor
          border color as RGB (no color ressource here).
protected  IBorderConfiguration _borderConfiguration
          the border configuraion.
protected  org.eclipse.swt.graphics.FontData _font
          the font data to use (no font ressource here).
protected  org.eclipse.swt.graphics.RGB _foregroundColor
          foreground color as RGB (no color ressource here).
protected  ITableViewState.HAlignment _hAlignment
          horizontal alignement.
protected  boolean _multiLine
          should allow multinline.
protected  ITableViewState.VAlignment _vAlignment
          vertical alignment.
 
Fields inherited from class de.jaret.util.misc.PropertyObservableBase
_propertyChangeSupport
 
Fields inherited from interface de.jaret.util.ui.table.renderer.ICellStyle
BACKGROUNDCOLOR, BORDERCOLOR, BORDERCONFIGURATION, FONT, FOREGROUNDCOLOR, HORIZONTAL_ALIGNMENT, VERTICAL_ALIGNMENT
 
Constructor Summary
DefaultCellStyle(org.eclipse.swt.graphics.RGB foregroundColor, org.eclipse.swt.graphics.RGB backgroundColor, IBorderConfiguration borderConfiguration, org.eclipse.swt.graphics.FontData font)
          Construct a new default cell style.
 
Method Summary
 DefaultCellStyle copy()
          Copy the cell style.
 org.eclipse.swt.graphics.RGB getBackgroundColor()
          Retrieve the background color.
 org.eclipse.swt.graphics.RGB getBorderColor()
          Retrieve the border color.
 IBorderConfiguration getBorderConfiguration()
          Retrieve the border configuration.
 org.eclipse.swt.graphics.FontData getFont()
          Retrieve the font.
 org.eclipse.swt.graphics.RGB getForegroundColor()
          Retrieve the foreground color.
 ITableViewState.HAlignment getHorizontalAlignment()
          Retrieve the horizontal alignment.
 boolean getMultiLine()
           
 ITableViewState.VAlignment getVerticalAlignment()
          Retrieve the vertical alignment.
 void setBackgroundColor(org.eclipse.swt.graphics.RGB backgroundColor)
          Set the background color.
 void setBorderColor(org.eclipse.swt.graphics.RGB borderColor)
          Set the border color.
 void setBorderConfiguration(IBorderConfiguration borderConfiguration)
          Set the border configuration.
 void setFont(org.eclipse.swt.graphics.FontData font)
          Set the font.
 void setForegroundColor(org.eclipse.swt.graphics.RGB foregroundColor)
          Set the foreground color.
 void setHorizontalAlignment(ITableViewState.HAlignment alignment)
          Set the horizontal alignment.
 void setMultiLine(boolean multiLine)
           
 void setVerticalAlignment(ITableViewState.VAlignment alignment)
          Set the vertical alignemnt.
 
Methods inherited from class de.jaret.util.misc.PropertyObservableBase
addPropertyChangeListener, firePropertyChange, isRealModification, removePropertyChangeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.jaret.util.misc.PropertyObservable
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

_borderConfiguration

protected IBorderConfiguration _borderConfiguration
the border configuraion.


_foregroundColor

protected org.eclipse.swt.graphics.RGB _foregroundColor
foreground color as RGB (no color ressource here).


_backgroundColor

protected org.eclipse.swt.graphics.RGB _backgroundColor
background color as RGB (no color ressource here).


_borderColor

protected org.eclipse.swt.graphics.RGB _borderColor
border color as RGB (no color ressource here).


_font

protected org.eclipse.swt.graphics.FontData _font
the font data to use (no font ressource here).


_hAlignment

protected ITableViewState.HAlignment _hAlignment
horizontal alignement.


_vAlignment

protected ITableViewState.VAlignment _vAlignment
vertical alignment.


_multiLine

protected boolean _multiLine
should allow multinline.

Constructor Detail

DefaultCellStyle

public DefaultCellStyle(org.eclipse.swt.graphics.RGB foregroundColor,
                        org.eclipse.swt.graphics.RGB backgroundColor,
                        IBorderConfiguration borderConfiguration,
                        org.eclipse.swt.graphics.FontData font)
Construct a new default cell style.

Parameters:
foregroundColor - forgeround
backgroundColor - background
borderConfiguration - border config
font - fontdata
Method Detail

copy

public DefaultCellStyle copy()
Copy the cell style.

Specified by:
copy in interface ICellStyle
Returns:
a copy of the cell style

getBackgroundColor

public org.eclipse.swt.graphics.RGB getBackgroundColor()
Description copied from interface: ICellStyle
Retrieve the background color.

Specified by:
getBackgroundColor in interface ICellStyle
Returns:
Returns the backgroundColor.

setBackgroundColor

public void setBackgroundColor(org.eclipse.swt.graphics.RGB backgroundColor)
Description copied from interface: ICellStyle
Set the background color.

Specified by:
setBackgroundColor in interface ICellStyle
Parameters:
backgroundColor - The backgroundColor to set.

getBorderColor

public org.eclipse.swt.graphics.RGB getBorderColor()
Description copied from interface: ICellStyle
Retrieve the border color.

Specified by:
getBorderColor in interface ICellStyle
Returns:
Returns the borderColor.

setBorderColor

public void setBorderColor(org.eclipse.swt.graphics.RGB borderColor)
Set the border color.

Specified by:
setBorderColor in interface ICellStyle
Parameters:
borderColor - border color

getBorderConfiguration

public IBorderConfiguration getBorderConfiguration()
Description copied from interface: ICellStyle
Retrieve the border configuration.

Specified by:
getBorderConfiguration in interface ICellStyle
Returns:
Returns the borderConfiguration.

setBorderConfiguration

public void setBorderConfiguration(IBorderConfiguration borderConfiguration)
Set the border configuration.

Specified by:
setBorderConfiguration in interface ICellStyle
Parameters:
borderConfiguration - the onfiguration to use

getFont

public org.eclipse.swt.graphics.FontData getFont()
Description copied from interface: ICellStyle
Retrieve the font.

Specified by:
getFont in interface ICellStyle
Returns:
Returns the font.

setFont

public void setFont(org.eclipse.swt.graphics.FontData font)
Description copied from interface: ICellStyle
Set the font.

Specified by:
setFont in interface ICellStyle
Parameters:
font - The font to set.

getForegroundColor

public org.eclipse.swt.graphics.RGB getForegroundColor()
Description copied from interface: ICellStyle
Retrieve the foreground color.

Specified by:
getForegroundColor in interface ICellStyle
Returns:
Returns the foregroundColor.

setForegroundColor

public void setForegroundColor(org.eclipse.swt.graphics.RGB foregroundColor)
Description copied from interface: ICellStyle
Set the foreground color.

Specified by:
setForegroundColor in interface ICellStyle
Parameters:
foregroundColor - The foregroundColor to set.

getHorizontalAlignment

public ITableViewState.HAlignment getHorizontalAlignment()
Retrieve the horizontal alignment.

Specified by:
getHorizontalAlignment in interface ICellStyle
Returns:
the horizontal alignment

setHorizontalAlignment

public void setHorizontalAlignment(ITableViewState.HAlignment alignment)
Set the horizontal alignment.

Specified by:
setHorizontalAlignment in interface ICellStyle
Parameters:
alignment - the horizontal alignment

getVerticalAlignment

public ITableViewState.VAlignment getVerticalAlignment()
Retrieve the vertical alignment.

Specified by:
getVerticalAlignment in interface ICellStyle
Returns:
the vertical alignment

setVerticalAlignment

public void setVerticalAlignment(ITableViewState.VAlignment alignment)
Set the vertical alignemnt.

Specified by:
setVerticalAlignment in interface ICellStyle
Parameters:
alignment - the vertical alignment

getMultiLine

public boolean getMultiLine()
Specified by:
getMultiLine in interface ICellStyle
Returns:
Returns the multiLine.

setMultiLine

public void setMultiLine(boolean multiLine)
Specified by:
setMultiLine in interface ICellStyle
Parameters:
multiLine - The multiLine to set.


Copyright © 2012. All Rights Reserved.