ca.sqlpower.wabit.report
Class ColumnInfo

java.lang.Object
  extended by ca.sqlpower.wabit.AbstractWabitObject
      extended by ca.sqlpower.wabit.report.ColumnInfo
All Implemented Interfaces:
WabitObject

public class ColumnInfo
extends AbstractWabitObject


Nested Class Summary
static class ColumnInfo.GroupAndBreak
          Defines if the column is a grouping, break or neither.
 
Field Summary
static java.lang.String COLUMN_ALIAS
           
static java.lang.String COLUMN_INFO_ITEM_CHANGED
           
static java.lang.String DATATYPE_CHANGED
           
static java.lang.String FORMAT_CHANGED
           
static java.lang.String HORIZONAL_ALIGNMENT_CHANGED
           
static java.lang.String WIDTH_CHANGED
           
static java.lang.String WILL_GROUP_OR_BREAK_CHANGED
           
static java.lang.String WILL_SUBTOTAL_CHANGED
           
 
Constructor Summary
ColumnInfo(ColumnInfo columnInfo)
           
ColumnInfo(ca.sqlpower.query.Item item, java.lang.String label)
           
ColumnInfo(java.lang.String label)
           
ColumnInfo(java.lang.String alias, java.lang.String label)
           
 
Method Summary
 boolean allowsChildren()
          Returns true if this object may contain children.
 int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
          Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type.
 java.util.List<? extends WabitObject> getChildren()
          Returns an unmodifiable list of the children in this WabitObject.
 java.lang.String getColumnAlias()
           
 ca.sqlpower.query.Item getColumnInfoItem()
          This value can be null.
 DataType getDataType()
           
 java.util.List<WabitObject> getDependencies()
          Returns a list of all WabitObjects that this Wabit object is dependent on.
 java.text.Format getFormat()
           
 HorizontalAlignment getHorizontalAlignment()
           
 int getWidth()
           
 ColumnInfo.GroupAndBreak getWillGroupOrBreak()
           
 boolean getWillSubtotal()
           
protected  boolean removeChildImpl(WabitObject child)
          This is the object specific implementation of removeChild.
 void removeDependency(WabitObject dependency)
          Removes the given object as a dependency of this object.
 void setColumnAlias(java.lang.String columnAlias)
           
 void setDataType(DataType type)
           
 void setFormat(java.text.Format format)
           
 void setHorizontalAlignment(HorizontalAlignment align)
           
 void setWidth(int width)
           
 void setWillGroupOrBreak(ColumnInfo.GroupAndBreak willGroupOrBreak)
           
 void setWillSubtotal(boolean subtotal)
           
 
Methods inherited from class ca.sqlpower.wabit.AbstractWabitObject
addChild, addChildImpl, addWabitListener, begin, beginTransaction, cleanup, commit, commitTransaction, equals, fireChildAdded, fireChildRemoved, firePropertyChange, firePropertyChange, firePropertyChange, fireTransactionEnded, fireTransactionRollback, fireTransactionStarted, generateNewUUID, getChildren, getName, getParent, getSession, getUUID, isForegroundThread, removeChild, removeWabitListener, rollback, rollbackTransaction, runInBackground, runInForeground, setName, setParent, setUUID, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

FORMAT_CHANGED

public static final java.lang.String FORMAT_CHANGED
See Also:
Constant Field Values

DATATYPE_CHANGED

public static final java.lang.String DATATYPE_CHANGED
See Also:
Constant Field Values

HORIZONAL_ALIGNMENT_CHANGED

public static final java.lang.String HORIZONAL_ALIGNMENT_CHANGED
See Also:
Constant Field Values

COLUMN_INFO_ITEM_CHANGED

public static final java.lang.String COLUMN_INFO_ITEM_CHANGED
See Also:
Constant Field Values

WIDTH_CHANGED

public static final java.lang.String WIDTH_CHANGED
See Also:
Constant Field Values

WILL_GROUP_OR_BREAK_CHANGED

public static final java.lang.String WILL_GROUP_OR_BREAK_CHANGED
See Also:
Constant Field Values

WILL_SUBTOTAL_CHANGED

public static final java.lang.String WILL_SUBTOTAL_CHANGED
See Also:
Constant Field Values

COLUMN_ALIAS

public static final java.lang.String COLUMN_ALIAS
See Also:
Constant Field Values
Constructor Detail

ColumnInfo

public ColumnInfo(ca.sqlpower.query.Item item,
                  java.lang.String label)

ColumnInfo

public ColumnInfo(java.lang.String label)

ColumnInfo

public ColumnInfo(java.lang.String alias,
                  java.lang.String label)

ColumnInfo

public ColumnInfo(ColumnInfo columnInfo)
Method Detail

getColumnInfoItem

public ca.sqlpower.query.Item getColumnInfoItem()
This value can be null. There is no Item defined for columns that are generated from users modifying the SQL script manually.


getWidth

public int getWidth()

setWidth

public void setWidth(int width)

getHorizontalAlignment

public HorizontalAlignment getHorizontalAlignment()

setHorizontalAlignment

public void setHorizontalAlignment(HorizontalAlignment align)

getDataType

public DataType getDataType()

setDataType

public void setDataType(DataType type)

getFormat

public java.text.Format getFormat()

setFormat

public void setFormat(java.text.Format format)

allowsChildren

public boolean allowsChildren()
Description copied from interface: WabitObject
Returns true if this object may contain children. Not all types of WabitObjects can be a child to any WabitObject.

See Also:
WabitObject.childPositionOffset(Class)

childPositionOffset

public int childPositionOffset(java.lang.Class<? extends WabitObject> childType)
Description copied from interface: WabitObject
Returns the position in the list that would be returned by getChildren() that the first object of type childClass is, or where it would be if there were any children of that type.


getChildren

public java.util.List<? extends WabitObject> getChildren()
Description copied from interface: WabitObject
Returns an unmodifiable list of the children in this WabitObject. If there are no children in this WabitObject an empty list should be returned.


getWillGroupOrBreak

public ColumnInfo.GroupAndBreak getWillGroupOrBreak()

setWillGroupOrBreak

public void setWillGroupOrBreak(ColumnInfo.GroupAndBreak willGroupOrBreak)

getWillSubtotal

public boolean getWillSubtotal()

setWillSubtotal

public void setWillSubtotal(boolean subtotal)

setColumnAlias

public void setColumnAlias(java.lang.String columnAlias)

getColumnAlias

public java.lang.String getColumnAlias()

getDependencies

public java.util.List<WabitObject> getDependencies()
Description copied from interface: WabitObject
Returns a list of all WabitObjects that this Wabit object is dependent on. Children of a WabitObject are not dependencies and will not be returned in this list. If there are no objects this Wabit object is dependent on an empty list should be returned. These are only the immediate dependencies of this object. If you want to find the dependencies of this object's dependencies as well it may be useful to look at WorkspaceGraphModel to make a full graph of all of the dependencies.


removeDependency

public void removeDependency(WabitObject dependency)
Description copied from interface: WabitObject
Removes the given object as a dependency of this object. For this object to no longer be dependent on the given dependency all of its children must also not be dependent on the given dependency when this method returns. This may remove this object from its parent if necessary.


removeChildImpl

protected boolean removeChildImpl(WabitObject child)
Description copied from class: AbstractWabitObject
This is the object specific implementation of removeChild. There are checks in the removeChild method to ensure the child being removed has no dependencies and is a child of this object.

Specified by:
removeChildImpl in class AbstractWabitObject
See Also:
AbstractWabitObject.removeChild(WabitObject)


Copyright © 2009. All Rights Reserved.