edu.washington.cs.supple.render
Class WidgetProperties

java.lang.Object
  extended byedu.washington.cs.supple.render.WidgetProperties
All Implemented Interfaces:
java.io.Serializable

public class WidgetProperties
extends java.lang.Object
implements java.io.Serializable

Author:
anthonyw This is the wrapper class for the set of properties a widget has This class is oblivious to what the actual widget is when it's rendered Allows us to make generalized comparisons of a set of widgets
See Also:
Serialized Form

Field Summary
protected  float changeOfVisualContext
           
static float CONTEXT_CHANGE_NOT_REQ
           
static float CONTEXT_CHANGE_REQ
           
static float CONTINUOUS_DATA
           
protected  float dataLayoutDirection
           
protected  float dataType
           
static float DISCRETE_DATA
           
static float DISPLAYS_ENTIRE_DOMAIN
           
static float DISPLAYS_MIN_DOMAIN
           
static float DISPLAYS_PARTIAL_DOMAIN
           
protected  float domainRange
           
static float FIXED_SIZE
           
static float HORIZONTAL_ALIGNMENT
           
static float HORIZONTAL_DISPLAY
           
static float HORIZONTAL_WIDGET
           
protected  boolean isContainer
           
protected  boolean isInitialized
           
static float NOT_FIXED_SIZE
           
static int NUM_PROPERTIES
           
protected  java.lang.String objectLabel
           
static float PARALLEL_TAB_ALIGNMENT
           
protected  float relativeAlignment
           
protected  float sizeFlexibility
           
static float SQUARE_WIDGET
           
static float UNDEFINED_PROPERTY
           
static float VERTICAL_ALIGNMENT
           
static float VERTICAL_DISPLAY
           
static float VERTICAL_WIDGET
           
protected  float widgetOrientation
           
protected  java.awt.Dimension widgetSize
           
protected  java.lang.String widgetType
           
protected  WidgetProperties wrapper
           
 
Constructor Summary
WidgetProperties(java.lang.String widgetType, java.lang.String fullName)
          Emtpy Constructor Not Recommended for use, used as a placeholder if needed in abstract objects
WidgetProperties(java.lang.String widgetType, java.lang.String fullName, java.awt.Dimension size, float relativeAlignment, float changeOfVisualContext)
          Recommended Constructor for Container Widgets
WidgetProperties(java.lang.String widgetType, java.lang.String fullName, java.awt.Dimension size, float dataLayoutDirection, float domainRange, float dataType, float sizeFlexibility)
          Recommended Constructor for Individual Widgets (non-Containers)
 
Method Summary
 boolean displaysDiscreteData()
           
 boolean displaysEntireDomain()
           
 boolean displaysMinDomain()
           
 float getContainerChangeOfVisualContext()
           
 float getContainerRelativeAlignment()
           
 float getDataLayoutDirection()
           
 float getDataType()
           
 float getDomainRange()
           
 java.lang.String getIDLabel()
           
 float getSizeFlexibility()
           
 WidgetProperties getWrapper()
           
 boolean isContainer()
           
 boolean isDataContinuous()
           
 boolean isDataDiscrete()
           
 boolean isDataLayoutHorizontal()
           
 boolean isDataLayoutVertical()
           
 boolean isFixedSize()
           
 boolean isHorizontal()
           
 boolean isNotFixedSize()
           
 boolean isSquare()
           
 boolean isVertical()
           
 void resetSize(java.awt.Dimension size)
           
 void setWrapper(WidgetProperties wrapper)
          Set wrapper WidgetProperties
 java.lang.String toPrettyString()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NUM_PROPERTIES

public static final int NUM_PROPERTIES
See Also:
Constant Field Values

HORIZONTAL_WIDGET

public static final float HORIZONTAL_WIDGET
See Also:
Constant Field Values

SQUARE_WIDGET

public static final float SQUARE_WIDGET
See Also:
Constant Field Values

VERTICAL_WIDGET

public static final float VERTICAL_WIDGET
See Also:
Constant Field Values

HORIZONTAL_DISPLAY

public static final float HORIZONTAL_DISPLAY
See Also:
Constant Field Values

VERTICAL_DISPLAY

public static final float VERTICAL_DISPLAY
See Also:
Constant Field Values

DISPLAYS_MIN_DOMAIN

public static final float DISPLAYS_MIN_DOMAIN
See Also:
Constant Field Values

DISPLAYS_PARTIAL_DOMAIN

public static final float DISPLAYS_PARTIAL_DOMAIN
See Also:
Constant Field Values

DISPLAYS_ENTIRE_DOMAIN

public static final float DISPLAYS_ENTIRE_DOMAIN
See Also:
Constant Field Values

DISCRETE_DATA

public static final float DISCRETE_DATA
See Also:
Constant Field Values

CONTINUOUS_DATA

public static final float CONTINUOUS_DATA
See Also:
Constant Field Values

FIXED_SIZE

public static final float FIXED_SIZE
See Also:
Constant Field Values

NOT_FIXED_SIZE

public static final float NOT_FIXED_SIZE
See Also:
Constant Field Values

HORIZONTAL_ALIGNMENT

public static final float HORIZONTAL_ALIGNMENT
See Also:
Constant Field Values

PARALLEL_TAB_ALIGNMENT

public static final float PARALLEL_TAB_ALIGNMENT
See Also:
Constant Field Values

VERTICAL_ALIGNMENT

public static final float VERTICAL_ALIGNMENT
See Also:
Constant Field Values

CONTEXT_CHANGE_NOT_REQ

public static final float CONTEXT_CHANGE_NOT_REQ
See Also:
Constant Field Values

CONTEXT_CHANGE_REQ

public static final float CONTEXT_CHANGE_REQ
See Also:
Constant Field Values

UNDEFINED_PROPERTY

public static final float UNDEFINED_PROPERTY
See Also:
Constant Field Values

widgetType

protected java.lang.String widgetType

objectLabel

protected java.lang.String objectLabel

widgetSize

protected java.awt.Dimension widgetSize

widgetOrientation

protected float widgetOrientation

dataLayoutDirection

protected float dataLayoutDirection

domainRange

protected float domainRange

dataType

protected float dataType

sizeFlexibility

protected float sizeFlexibility

isContainer

protected boolean isContainer

relativeAlignment

protected float relativeAlignment

changeOfVisualContext

protected float changeOfVisualContext

isInitialized

protected boolean isInitialized

wrapper

protected WidgetProperties wrapper
Constructor Detail

WidgetProperties

public WidgetProperties(java.lang.String widgetType,
                        java.lang.String fullName,
                        java.awt.Dimension size,
                        float dataLayoutDirection,
                        float domainRange,
                        float dataType,
                        float sizeFlexibility)
Recommended Constructor for Individual Widgets (non-Containers)

Parameters:
widgetType - - Widget.getClass().toString()
size - - Widget.getSize(0);
dataLayoutDirection -
dataType -
sizeFlexibility -

WidgetProperties

public WidgetProperties(java.lang.String widgetType,
                        java.lang.String fullName,
                        java.awt.Dimension size,
                        float relativeAlignment,
                        float changeOfVisualContext)
Recommended Constructor for Container Widgets

Parameters:
widgetType - - Widget.getClass().toString()
size - - Widget.getSize(0);
relativeAlignment -
changeOfVisualContext -

WidgetProperties

public WidgetProperties(java.lang.String widgetType,
                        java.lang.String fullName)
Emtpy Constructor Not Recommended for use, used as a placeholder if needed in abstract objects

Method Detail

getIDLabel

public java.lang.String getIDLabel()
Returns:
String object of the master Widget's ID

setWrapper

public void setWrapper(WidgetProperties wrapper)
Set wrapper WidgetProperties

Parameters:
wrapper -

getWrapper

public WidgetProperties getWrapper()
Returns:
wrapper WidgetProperties

resetSize

public void resetSize(java.awt.Dimension size)

isContainer

public boolean isContainer()
Returns:
true if widget is a container

isDataDiscrete

public boolean isDataDiscrete()
Returns:
true if data representation model is discrete

isDataContinuous

public boolean isDataContinuous()
Returns:
true if data representation model is continuous

isHorizontal

public boolean isHorizontal()
Returns:
true if widget's rendered orientation is horizontal

isVertical

public boolean isVertical()
Returns:
true if widget's rendered orientation is vertical Provided for convenience

isSquare

public boolean isSquare()
Returns:
true if widget's rendered orientation is exactly square Provided for convenience

isDataLayoutHorizontal

public boolean isDataLayoutHorizontal()
Returns:
true if data layout orientation is horizontal

isDataLayoutVertical

public boolean isDataLayoutVertical()
Returns:
true if widget's rendered orientation is vertical Provided for convenience

displaysEntireDomain

public boolean displaysEntireDomain()
Returns:
true if widget is able to display its entire domain all at once

displaysMinDomain

public boolean displaysMinDomain()
Returns:
true if widget is able to display minimal domain

displaysDiscreteData

public boolean displaysDiscreteData()
Returns:
true if widget represents data in discrete increments

isFixedSize

public boolean isFixedSize()
Returns:
true if widget absolutely does not change size at runtime

isNotFixedSize

public boolean isNotFixedSize()
Returns:
true if widget absolutely does not change size at runtime

getDataLayoutDirection

public float getDataLayoutDirection()
Returns:
dataLayoutDirection

getDomainRange

public float getDomainRange()
Returns:
domainRange

getDataType

public float getDataType()
Returns:
dataType

getSizeFlexibility

public float getSizeFlexibility()
Returns:
sizeFlexibility

getContainerChangeOfVisualContext

public float getContainerChangeOfVisualContext()
Returns:
Returns the changeOfVisualContext.

getContainerRelativeAlignment

public float getContainerRelativeAlignment()
Returns:
Returns the relativeAlignment.

toString

public java.lang.String toString()
Returns:
String representation

toPrettyString

public java.lang.String toPrettyString()
Returns:
Formatted Pretty String representation