org.devaki.nextobjects.workspace.models.styles
Class ClassStyle

java.lang.Object
  extended byorg.devaki.nextobjects.workspace.models.styles.ClassStyle
All Implemented Interfaces:
java.io.Serializable, java.awt.datatransfer.Transferable

public class ClassStyle
extends java.lang.Object
implements java.awt.datatransfer.Transferable, java.io.Serializable

This class defines the style of all class-like objects

See Also:
Serialized Form

Field Summary
protected  java.awt.Color backgroundColor
           
protected  java.awt.Color borderColor
           
static java.awt.datatransfer.DataFlavor fieldFlavor
           
protected  ObjectView myObjectView
           
protected  boolean textAdjusted
           
 
Constructor Summary
ClassStyle(ClassStyle pClassStyle)
          Construct a new 'ClassStyle' object from an other
ClassStyle(ObjectView pObjectView)
          Construct a new 'ClassStyle' object with default properties
ClassStyle(ObjectView pObjectView, java.awt.Color pBackgroundColor, java.awt.Color pBorderColor, boolean pTextAdjusted)
          Construct a new 'ClassStyle' object
 
Method Summary
 java.awt.Color getBackgroundColor()
          Get the background color
 java.awt.Color getBorderColor()
          Get the border color
 ObjectView getMyObjectView()
          Return the object view to which the style is applied
 java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor parFlavor)
          Return the object to be used by the clipboard
 java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
          Return the flavors
 boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor parFlavor)
          Is the data supported by this class?
 boolean isTextAdjusted()
          Return wether or not the draw is adjusted to its content
 void setBackgroundColor(java.awt.Color pBackgroundColor)
          Set the background color
 void setBorderColor(java.awt.Color pBorderColor)
          Set the border color
 void setMyObjectView(ObjectView pObjectView)
          Define the object view to which the style is applied
 void setTextAdjusted(boolean pTextAdjusted)
          Set wether or not the draw is adjusted to its content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

backgroundColor

protected java.awt.Color backgroundColor

borderColor

protected java.awt.Color borderColor

textAdjusted

protected boolean textAdjusted

myObjectView

protected ObjectView myObjectView

fieldFlavor

public static java.awt.datatransfer.DataFlavor fieldFlavor
Constructor Detail

ClassStyle

public ClassStyle(ObjectView pObjectView)
Construct a new 'ClassStyle' object with default properties

Parameters:
pObjectView - the context object view

ClassStyle

public ClassStyle(ObjectView pObjectView,
                  java.awt.Color pBackgroundColor,
                  java.awt.Color pBorderColor,
                  boolean pTextAdjusted)
Construct a new 'ClassStyle' object

Parameters:
pObjectView - the context object
pBackgroundColor - the background color
pBorderColor - the border color
pTextAdjusted - the format

ClassStyle

public ClassStyle(ClassStyle pClassStyle)
Construct a new 'ClassStyle' object from an other

Parameters:
pClassStyle - the context class style
Method Detail

getMyObjectView

public ObjectView getMyObjectView()
Return the object view to which the style is applied

Returns:
the object view

setMyObjectView

public void setMyObjectView(ObjectView pObjectView)
Define the object view to which the style is applied

Parameters:
pObjectView - the object view

getBackgroundColor

public java.awt.Color getBackgroundColor()
Get the background color

Returns:
the background color

setBackgroundColor

public void setBackgroundColor(java.awt.Color pBackgroundColor)
Set the background color

Parameters:
pBackgroundColor - the background color

getBorderColor

public java.awt.Color getBorderColor()
Get the border color

Returns:
the border color

setBorderColor

public void setBorderColor(java.awt.Color pBorderColor)
Set the border color

Parameters:
pBorderColor - the border color

isTextAdjusted

public boolean isTextAdjusted()
Return wether or not the draw is adjusted to its content

Returns:
textAdjusted a boolean

setTextAdjusted

public void setTextAdjusted(boolean pTextAdjusted)
Set wether or not the draw is adjusted to its content

Parameters:
pTextAdjusted - a boolean

getTransferDataFlavors

public java.awt.datatransfer.DataFlavor[] getTransferDataFlavors()
Return the flavors

Specified by:
getTransferDataFlavors in interface java.awt.datatransfer.Transferable
Returns:
a table of DataFlavor

isDataFlavorSupported

public boolean isDataFlavorSupported(java.awt.datatransfer.DataFlavor parFlavor)
Is the data supported by this class?

Specified by:
isDataFlavorSupported in interface java.awt.datatransfer.Transferable
Parameters:
parFlavor -
Returns:
a boolean

getTransferData

public java.lang.Object getTransferData(java.awt.datatransfer.DataFlavor parFlavor)
                                 throws java.awt.datatransfer.UnsupportedFlavorException
Return the object to be used by the clipboard

Specified by:
getTransferData in interface java.awt.datatransfer.Transferable
Parameters:
parFlavor -
Returns:
an Object
Throws:
java.awt.datatransfer.UnsupportedFlavorException


Copyright © 2002-2004 devaki.org. All Rights Reserved.