|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.miginfocom.beans.AbstractHeaderBean
com.miginfocom.beans.CategoryHeaderBean
public abstract class CategoryHeaderBean
A header object that wraps (aggregates) a real Header implementation.
This bean is for simplifying the usage of a header and to make the header a visual JavaBean.
Note! The category header will end up on the si
| Field Summary | |
|---|---|
protected javax.swing.border.Border |
cellBorder
|
protected java.awt.Cursor |
cellCursor
|
protected java.lang.Boolean |
folderOverlapChildren
|
protected java.lang.Integer |
forcedHeaderSize
|
protected DefaultSubRowLevel[] |
headerLevels
|
protected java.awt.Cursor |
knobCursor
|
protected XtdImage |
knobExpandedImage
|
protected XtdImage |
knobFoldedImage
|
protected AtRefRangeNumber |
knobImageAlignX
|
protected AtRefRangeNumber |
knobImageAlignY
|
protected java.awt.Cursor |
labelCursor
|
protected XtdImage |
rowFolderImage
|
protected AtRefRangeNumber |
rowImageAlignX
|
protected AtRefRangeNumber |
rowImageAlignY
|
protected XtdImage |
rowLeafImage
|
protected java.lang.Integer |
textAntiAlias
|
| Fields inherited from class com.miginfocom.beans.AbstractHeaderBean |
|---|
bgPaint |
| Constructor Summary | |
|---|---|
CategoryHeaderBean()
|
|
| Method Summary | |
|---|---|
void |
addInteractionListener(InteractionListener l)
Adds a listener that listens to InteractionEvents. |
void |
addInteractionListener(InteractionListener l,
boolean asWeakRef)
Adds a listener that listens to InteractionEvents. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a listener that gets notified when a property has changed. |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l,
boolean asWeakRef)
Adds a listener that gets notified when a property has changed. |
protected void |
fireInteractionOccured(InteractionEvent e)
Notifies all listeners of the the event but stops as soon as the event get's consumed. |
protected boolean |
firePropertyChange(java.lang.String propName,
int oldValue,
int newValue)
Fires a property change event to the listeners |
protected boolean |
firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
Fires a property change event to the listeners |
boolean |
firePropertyChangeEvent(java.beans.PropertyChangeEvent e)
Fires a property change event to the listeners |
int |
getCategoryDepth()
|
javax.swing.border.Border |
getCellBorder()
Property: The Border used to draw around the cells in the header. |
java.awt.Cursor |
getCellCursor()
Property: The Cursor that the mouse pointer should change to when over a cell (and not label). |
java.lang.Integer |
getForcedHeaderSize()
Property: The size (height if top/bottom and width if left/right) of the header. |
Header |
getHeader()
|
DefaultSubRowLevel[] |
getHeaderLevels()
Property: The specification for the levels that correspond to the category level. |
java.awt.Cursor |
getKnobCursor()
Property: The Cursor that the mouse pointer should change to when over +- knob. |
XtdImage |
getKnobExpandedImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. |
XtdImage |
getKnobFoldedImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. |
boolean |
getKnobFoldOnPress()
Property: If the corresponding sub row should be folded when the user press the knob image in the category header. |
AtRefRangeNumber |
getKnobImageAlignX()
Property: How the knob image should be aligned horizontally. |
AtRefRangeNumber |
getKnobImageAlignY()
Property: How the knob image should be aligned vertically. |
java.awt.Cursor |
getLabelCursor()
Property: The Cursor that the mouse pointer should change to when over a category label. |
boolean |
getLabelFoldOnPress()
Property: If the corresponding sub row should be folded when the user press the label in the category header. |
boolean |
getNoExpandedFolderGridLine()
Deprecated. Use DateAreaBean#getNoExpandedFolderGridLine instead. |
XtdImage |
getRowFolderImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that aren't leaves. |
AtRefRangeNumber |
getRowImageAlignX()
Property: How the row image should be aligned horizontally. |
AtRefRangeNumber |
getRowImageAlignY()
Property: How the row image should be aligned vertically. |
XtdImage |
getRowLeafImage()
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that doesn't have sub rows. |
int |
getTextAntiAlias()
Property: The anti aliasing hint used when drawing the text for the shape. |
void |
interactionOccured(InteractionEvent e)
Called when an interaction has occured |
boolean |
isFolderOverlapChildren()
Property: If the folder category rows, which contains other rows, should get it's secondary dimension's (along the header) size stretched over all its sub rows bounds. |
protected void |
recreateHeader()
Set the header to null and revalidate the container |
void |
removeInteractionListener(InteractionListener l)
Removes the listener. |
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes the listener, if it is in the list. |
void |
setCellBorder(javax.swing.border.Border border)
Property: The Border used to draw around the cells in the header. |
void |
setCellCursor(java.awt.Cursor cur)
Property: The Cursor that the mouse pointer should change to when over a cell (and not label). |
boolean |
setDateAreaContainer(DateAreaBean container)
Sets the DateAreaContainer that this header should decorate. |
void |
setFolderOverlapChildren(boolean b)
Property: If the folder category rows, which contains other rows, should get it's secondary dimension's (along the header) size stretched over all its sub rows bounds. |
void |
setForcedHeaderSize(java.lang.Integer size)
Property: The size (height if top/bottom and width if left/right) of the header. |
void |
setHeaderLevels(DefaultSubRowLevel[] rows)
Property: The specification for the levels that correspond to the category level. |
boolean |
setIgnorePropertyChangeEvents(boolean b)
Sets if PropertyChangeEvent's should be fired. |
void |
setKnobCursor(java.awt.Cursor cur)
Property: The Cursor that the mouse pointer should change to when over +- knob. |
void |
setKnobExpandedImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. |
void |
setKnobFoldedImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. |
void |
setKnobFoldOnPress(boolean b)
Property: If the corresponding sub row should be folded when the user press the knob image in the category header. |
void |
setKnobImageAlignX(AtRefRangeNumber align)
Property: How the knob image should be aligned horizontally. |
void |
setKnobImageAlignY(AtRefRangeNumber align)
Property: How the knob image should be aligned vertically. |
void |
setLabelCursor(java.awt.Cursor cur)
Property: The Cursor that the mouse pointer should change to when over a category label. |
void |
setLabelFoldOnPress(boolean b)
Property: If the corresponding sub row should be folded when the user press the label in the category header. |
void |
setNoExpandedFolderGridLine(boolean b)
Deprecated. Use DateAreaBean#setNoExpandedFolderGridLine instead. |
void |
setRowFolderImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that aren't leaves. |
void |
setRowImageAlignX(AtRefRangeNumber align)
Property: How the row image should be aligned horizontally. |
void |
setRowImageAlignY(AtRefRangeNumber align)
Property: How the row image should be aligned vertically. |
void |
setRowLeafImage(XtdImage image)
Property: A XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that doesn't have sub rows. |
void |
setTextAntiAlias(int hint)
Property: The anti aliasing hint used when drawing the text for the shape. |
protected void |
transferPropertiesToHeadersLevels()
|
| Methods inherited from class com.miginfocom.beans.AbstractHeaderBean |
|---|
getBackgroundPaint, getContainer, getEdge, getExpandToCorner, isVisible, revalidateRepaintContainer, setBackgroundPaint, setEdge, setExpandToCorner, setVisible |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient java.lang.Boolean folderOverlapChildren
protected transient java.lang.Integer forcedHeaderSize
protected transient DefaultSubRowLevel[] headerLevels
protected transient javax.swing.border.Border cellBorder
protected transient XtdImage knobExpandedImage
protected transient XtdImage knobFoldedImage
protected transient AtRefRangeNumber knobImageAlignX
protected transient AtRefRangeNumber knobImageAlignY
protected transient AtRefRangeNumber rowImageAlignX
protected transient AtRefRangeNumber rowImageAlignY
protected transient java.lang.Integer textAntiAlias
protected transient java.awt.Cursor labelCursor
protected transient java.awt.Cursor cellCursor
protected transient java.awt.Cursor knobCursor
protected transient XtdImage rowFolderImage
protected transient XtdImage rowLeafImage
| Constructor Detail |
|---|
public CategoryHeaderBean()
| Method Detail |
|---|
public boolean setDateAreaContainer(DateAreaBean container)
AbstractHeaderBeanDateAreaContainer that this header should decorate. This will be called by the
controller that handles them both and the header will not work unless this property has been set.
setDateAreaContainer in class AbstractHeaderBeancontainer - The container that this header should decorate. null resets the header.
false if the same container was set again.public Header getHeader()
public int getCategoryDepth()
protected void recreateHeader()
null and revalidate the container
recreateHeader in class AbstractHeaderBeanprotected void transferPropertiesToHeadersLevels()
public void interactionOccured(InteractionEvent e)
InteractionListener
interactionOccured in interface InteractionListenere - The eventpublic boolean getNoExpandedFolderGridLine()
false.public void setNoExpandedFolderGridLine(boolean b)
public boolean getLabelFoldOnPress()
InteractionEvent and fold the corresponding
row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and
there perform code like:
Object interacted = e.getInteractor().getInteracted();
if (interacted instanceof GridRow) {
GridRow row = (GridRow) interacted;
row.setFolded(!row.isFolded());
revalidateRepaintContainer();
}
getKnobFoldOnPress()public void setLabelFoldOnPress(boolean b)
InteractionEvent and fold the corresponding
row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and
there perform code like:
Object interacted = e.getInteractor().getInteracted();
if (interacted instanceof GridRow) {
GridRow row = (GridRow) interacted;
row.setFolded(!row.isFolded());
revalidateRepaintContainer();
}
b - The new value.setKnobFoldOnPress(boolean)public java.awt.Cursor getLabelCursor()
Cursor that the mouse pointer should change to when over a category label.
null which means no change.public void setLabelCursor(java.awt.Cursor cur)
Cursor that the mouse pointer should change to when over a category label.
cur - The new Cursor. May be null which means no change.public java.awt.Cursor getCellCursor()
Cursor that the mouse pointer should change to when over a cell (and not label).
null which means no change.public void setCellCursor(java.awt.Cursor cur)
Cursor that the mouse pointer should change to when over a cell (and not label).
cur - The new Cursor. May be null which means no change.public boolean getKnobFoldOnPress()
InteractionEvent and fold the corresponding
row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and
there perform code like:
Object interacted = e.getInteractor().getInteracted();
if (interacted instanceof GridRow) {
GridRow row = (GridRow) interacted;
row.setFolded(!row.isFolded());
revalidateRepaintContainer();
}
getLabelFoldOnPress()public void setKnobFoldOnPress(boolean b)
InteractionEvent and fold the corresponding
row. This can also be done manually, to get more control, by adding a listener with addInteractionListener(com.miginfocom.ashape.interaction.InteractionListener) and
there perform code like:
Object interacted = e.getInteractor().getInteracted();
if (interacted instanceof GridRow) {
GridRow row = (GridRow) interacted;
row.setFolded(!row.isFolded());
revalidateRepaintContainer();
}
b - The new value.setLabelFoldOnPress(boolean)public java.awt.Cursor getKnobCursor()
Cursor that the mouse pointer should change to when over +- knob.
null which means no change.public void setKnobCursor(java.awt.Cursor cur)
Cursor that the mouse pointer should change to when over +- knob.
cur - The new Cursor. May be null which means no change.public XtdImage getRowFolderImage()
XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that aren't leaves.
null if no image should be shown/used.public void setRowFolderImage(XtdImage image)
XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that aren't leaves.
image - The new image or null if no image should be shown/used.public XtdImage getRowLeafImage()
XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that doesn't have sub rows.
null if no image should be shown/used.public void setRowLeafImage(XtdImage image)
XtdImage (which is a very flexible Image/Icon) that should represent a folder and are shown
for sub rows that doesn't have sub rows.
image - The new image or null if no image should be shown/used.public java.lang.Integer getForcedHeaderSize()
HeaderLevels
(see setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[])) but sometimes a specific size is needed or is simpler to set.
Depending on the setted HeaderLevels those will span this size, but they don't have to.
null which means that the header should use the HeaderLevels to caclulate the preferred size.public void setForcedHeaderSize(java.lang.Integer size)
HeaderLevels
(see setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[])) but sometimes a specific size is needed or is simpler to set.
Depending on the setted HeaderLevels those will span this size, but they don't have to.
size - The new size or null which means that the header should use the HeaderLevels to caclulate the preferred size.public DefaultSubRowLevel[] getHeaderLevels()
This means that a level will get the same attributes normally. It may be background, foreground, color and such things and is outlined in the
DefaultSubRowLevel instances in the array. This also includes mouse over and mouse pressed effects.
null.setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[])public void setHeaderLevels(DefaultSubRowLevel[] rows)
Level 0 (main row)
People (Level 1)
Chris (Level 2)
Susan (Level 2)
Aircraft (Level 1)
SE001 (Level 2)
SE002 (Level 2)
SE002 (Level 2)
Example 2:
| Other, top header...
________________|_________________
| | | |
| P | L | Work |
| e | i | |
| r | s |=======|
| s | a | Home |
| o | | |
| n |===|=======| The date area
| n | | |
| e | M | Work |
| l | a |=======|
| | r | |
| | k | Home |
________________|_________________
When the columns is level 1, 2 and 3. The whole row is level 0.
This means that a level will get the same attributes normally. It may be background, foreground, color and such things and is outlined in the
DefaultSubRowLevel instances in the array. This also includes mouse over and mouse pressed effects.
rows - The new rows. null is same as empty array.public boolean isFolderOverlapChildren()
setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[]) shows how this might look. Note that this is only in the secondary dimension.
public void setFolderOverlapChildren(boolean b)
setHeaderLevels(com.miginfocom.calendar.header.DefaultSubRowLevel[]) shows how this might look. Note that this is only in the secondary dimension.
b - Whether folder rows' size should include its childrens bounds in the secondary dimension.public javax.swing.border.Border getCellBorder()
Border used to draw around the cells in the header.
null if no border should be painted.public void setCellBorder(javax.swing.border.Border border)
Border used to draw around the cells in the header.
border - The new border or null if no border should be painted.public XtdImage getKnobExpandedImage()
XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you
press th expand/fold the folder rows. This is for folder rows that are in their expanded state.
null for none.public void setKnobExpandedImage(XtdImage image)
XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you
press th expand/fold the folder rows. This is for folder rows that are in their expanded state.
image - The new image or null for none.public XtdImage getKnobFoldedImage()
XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you
press th expand/fold the folder rows. This is for folder rows that are in their folded state.
null for none.public void setKnobFoldedImage(XtdImage image)
XtdImage (which is a very flexible Image/Icon) that should decorate the knob (handle, e.g. +-) that you
press th expand/fold the folder rows. This is for folder rows that are in their folded state.
image - The new image or null for none.public AtRefRangeNumber getKnobImageAlignX()
new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.
null for which the behaviour is undefined.AtFraction,
AtStart,
AtEndpublic void setKnobImageAlignX(AtRefRangeNumber align)
new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.
align - The new alignment. Not null.AtFraction,
AtStart,
AtEndpublic AtRefRangeNumber getKnobImageAlignY()
new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.
null.AtFraction,
AtStart,
AtEndpublic void setKnobImageAlignY(AtRefRangeNumber align)
new AtFraction(0.5f) for centered or new AtEnd(-2f) for two pixels from the bottom edge.
align - The new alignment Not null.AtFraction,
AtStart,
AtEndpublic AtRefRangeNumber getRowImageAlignX()
new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.
null.AtFraction,
AtStart,
AtEndpublic void setRowImageAlignX(AtRefRangeNumber align)
new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.
align - The new alignment. Not null.AtFraction,
AtStart,
AtEndpublic AtRefRangeNumber getRowImageAlignY()
new AtFraction(0.5f) for centered or new AtStart(2f) for two pixels from the left edge.
null.AtFraction,
AtStart,
AtEndpublic void setRowImageAlignY(AtRefRangeNumber align)
new AtFraction(0.5f) for centered or new AtEnd(-2f) for two pixels from the bottom edge.
align - The new alignment. Not null.AtFraction,
AtStart,
AtEndpublic int getTextAntiAlias()
GfxUtil.AA_HINT_ON.
null.GfxUtil.confAntiAliasingHint(java.awt.Graphics2D, boolean, int)public void setTextAntiAlias(int hint)
GfxUtil.AA_HINT_PLATFORM.
hint - The new hint.GfxUtil.confAntiAliasingHint(java.awt.Graphics2D, boolean, int)public void addInteractionListener(InteractionListener l)
InteractionEvents. Interaction events are normally fired by the Interaction/Interactor/AbstractInteractionBroker
framework, used for instance by the AShape framework.
The interaction events that is fired is when the user presses the knob or the label in the header.
This class is actually a re-dispatcher of these events. It is itself an InteractionListener and registers itself on the
interaction observable objects it creates. For instance ActivityViews.
l - The listener to add
public void addInteractionListener(InteractionListener l,
boolean asWeakRef)
InteractionEvents. Interaction events are normally fired by the Interaction/Interactor/AbstractInteractionBroker
framework, used for instance by the AShape framework.
The interaction events that is fired is when the user presses the knob or the label in the header.
This class is actually a re-dispatcher of these events. It is itself an InteractionListener and registers itself on the
interaction observable objects it creates. For instance ActivityViews.
l - The listener to addasWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since
the garbage collector can collect the listener if it is only referenced from this list.
Note! This (weak reference) can not be used with listeners that doesn't have another real (a.k.a Strong) reference to it, as for instance an annonymous inner class. If one such listener is added it will be removed almost immediately by the garbage collector.
public void removeInteractionListener(InteractionListener l)
l - The listener to remove.protected void fireInteractionOccured(InteractionEvent e)
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
l - The listener. Not null
public void addPropertyChangeListener(java.beans.PropertyChangeListener l,
boolean asWeakRef)
l - The listener. Not nullasWeakRef - If the listener should be added wrapped in a WeakReference. This defers memory leak problems since
the garbage collector can collect the listener if it is only referenced from this list.public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
l - The listener to remove, not null.public boolean setIgnorePropertyChangeEvents(boolean b)
PropertyChangeEvent's should be fired. Can be set to false if batch updates will occur for instance.
b - true or false...
protected boolean firePropertyChange(java.lang.String propName,
int oldValue,
int newValue)
protected boolean firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
public boolean firePropertyChangeEvent(java.beans.PropertyChangeEvent e)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||