|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.jidesoft.grid.AbstractNode com.jidesoft.grid.AbstractExpandable com.jidesoft.grid.AbstractExpandableRow com.jidesoft.gantt.DefaultGanttEntry<T>
T
- The type of the bases unit of the range, for example Date or Integer.public class DefaultGanttEntry<T>
DefaultGanttEntry
is the default implementation of GanttEntry
.
Field Summary | |
---|---|
static int |
COLUMN_COMPLETION
|
static int |
COLUMN_NAME
|
static int |
COLUMN_RANGE_END
|
static int |
COLUMN_RANGE_START
|
Fields inherited from class com.jidesoft.grid.AbstractExpandable |
---|
_expandable, _expanded |
Fields inherited from class com.jidesoft.grid.AbstractNode |
---|
_parent, PROPERTY_PARENT |
Fields inherited from interface com.jidesoft.gantt.GanttEntry |
---|
PROPERTY_ADJUSTING |
Fields inherited from interface com.jidesoft.grid.Expandable |
---|
PROPERTY_EXPANDABLE, PROPERTY_EXPANDED |
Constructor Summary | |
---|---|
DefaultGanttEntry(String name)
|
|
DefaultGanttEntry(String name,
Class<T> rangeType,
Range<T> range,
double completion)
|
|
DefaultGanttEntry(String name,
Range<T> range)
|
Method Summary | |
---|---|
void |
addSubEntry(GanttEntry<T> entry)
Adds one sub entry. |
void |
childCompletionUpdated(DefaultGanttEntry<T> child)
|
void |
childNameUpdated(DefaultGanttEntry<T> child)
|
void |
childRangeUpdated(DefaultGanttEntry<T> child)
|
void |
completionUpdated()
|
protected int |
getActualColumnIndex(int column)
This method will do the conversion of the column index if the subclass wants to display the default columns in a different order. |
Class<?> |
getCellClassAt(int columnIndex)
Gets the type for the cell at columnIndex . |
List<GanttEntry<T>> |
getChildEntries()
|
List<?> |
getChildren()
Gets the list of children. |
double |
getCompletion()
Gets the percentage of completion as a double value between 0.0 and 1.0. |
ConverterContext |
getConverterContextAt(int columnIndex)
Gets the converter context for the cell at columnIndex . |
String |
getName()
Gets the name of the entry. |
Range<T> |
getRange()
Gets the range for this entry. |
List<GanttEntry<T>> |
getSubEntries()
Gets all sub entries of this GanttEntry. |
Object |
getValueAt(int columnIndex)
Gets the value for cell at columnIndex |
boolean |
isAdjusting()
Checks if the entry is adjusting. |
boolean |
isCellEditable(int columnIndex)
Returns true if the cell at columnIndex is editable. |
boolean |
isCompletionEditable()
|
boolean |
isRangeEditable()
|
void |
nameUpdated()
|
void |
notifyCellUpdated(Object child,
int columnIndex)
Notifies the child is updated. |
void |
notifyChildDeleted(Object child)
Notifies a child is deleted. |
void |
notifyChildInserted(Object child,
int childIndex)
Notifies the child is inserted as the specified index of this expandable. |
void |
notifyChildrenDeleted(List<? extends Row> children)
Notifies the children are deleted. |
void |
rangeUpdated()
|
void |
removeSubEntry(GanttEntry<T> entry)
Removes one sub entry. |
void |
setAdjusting(boolean adjusting)
Sets the adjusting flag. |
void |
setChildren(List<?> children)
Sets the children for this Expandable. |
void |
setCompletion(double completion)
A double value between [0.0, 1.0] representing the completion of the entry. |
void |
setName(String name)
|
void |
setRange(Range<T> range)
|
Range<T> |
setRange(T startInstant,
T endInstant)
NOTE: This method will do nothing if the current Range is null! |
void |
setSubEntries(List<GanttEntry<T>> subEntries)
Sets all sub entries of this GanttEntry. |
void |
setValueAt(Object value,
int columnIndex)
Sets the value in the cell at columnIndex . |
String |
toString()
|
Methods inherited from class com.jidesoft.grid.AbstractExpandableRow |
---|
cellUpdated, getEditorContextAt, rowUpdated |
Methods inherited from class com.jidesoft.grid.AbstractNode |
---|
addPropertyChangeListener, addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getLevel, getNextSibling, getParent, getPreviousSibling, getPropertyChangeListeners, getPropertyChangeListeners, removePropertyChangeListener, removePropertyChangeListener, setParent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.jidesoft.grid.Expandable |
---|
addChild, addChild, addChildren, getAllVisibleChildrenCount, getChildAt, getChildIndex, getChildrenCount, getNumberOfVisibleExpandable, hasChildren, isExpandable, isExpanded, moveDownChild, moveUpChild, notifyChildrenInserted, notifyChildrenUpdated, notifyChildUpdated, removeAllChildren, removeChild, removeChildren, setExpandable, setExpanded |
Methods inherited from interface com.jidesoft.grid.Row |
---|
cellUpdated, getEditorContextAt, rowUpdated |
Methods inherited from interface com.jidesoft.grid.Node |
---|
getLevel, getNextSibling, getParent, getPreviousSibling, setParent |
Field Detail |
---|
public static final int COLUMN_NAME
public static final int COLUMN_RANGE_START
public static final int COLUMN_RANGE_END
public static final int COLUMN_COMPLETION
Constructor Detail |
---|
public DefaultGanttEntry(String name)
public DefaultGanttEntry(String name, Range<T> range)
public DefaultGanttEntry(String name, Class<T> rangeType, Range<T> range, double completion)
name
- the name of the GanttEntry
rangeType
- The class to be returned in getCellClassAt(int)
for the default Range columns.range
- the Range of the GanttEntry
completion
- the completion percentage of the GanttEntry
Method Detail |
---|
protected int getActualColumnIndex(int column)
protected int getActualColumnIndex(int column) {
switch (column) {
case COLUMN_ID:
return 0;
case COLUMN_NAME:
return 1;
case COLUMN_COMPLETION:
return 2;
case COLUMN_RANGE_START:
return 5;
case COLUMN_RANGE_END:
return 6;
}
return super.getActualColumnIndex(column);
}
column
- the default column index.
public String getName()
GanttEntry
getName
in interface GanttEntry<T>
public void setName(String name)
public Range<T> getRange()
GanttEntry
getRange
in interface GanttEntry<T>
public void setRange(Range<T> range)
public Range<T> setRange(T startInstant, T endInstant)
setRange
in interface MutableGanttEntry<T>
startInstant
- The new start instant for this GanttEntry.endInstant
- The new end instant for this GanttEntry.
public void notifyChildDeleted(Object child)
Expandable
notifyChildDeleted
in interface Expandable
notifyChildDeleted
in class AbstractExpandable
child
- the child that is deletedpublic void notifyChildrenDeleted(List<? extends Row> children)
Expandable
notifyChildrenDeleted
in interface Expandable
notifyChildrenDeleted
in class AbstractExpandable
children
- the children that are deletedpublic void notifyCellUpdated(Object child, int columnIndex)
ExpandableRow
notifyCellUpdated
in interface ExpandableRow
notifyCellUpdated
in class AbstractExpandableRow
child
- the child which is updatedcolumnIndex
- the column index.public void notifyChildInserted(Object child, int childIndex)
Expandable
notifyChildInserted
in interface Expandable
notifyChildInserted
in class AbstractExpandable
child
- the child which is inserted.childIndex
- the index where it is inserted. -1 if the child is inserted as the last one.public void rangeUpdated()
public void childRangeUpdated(DefaultGanttEntry<T> child)
child
- The child which was added, had its range updated or null if the child was deleted.public List<GanttEntry<T>> getChildEntries()
public void nameUpdated()
public void childNameUpdated(DefaultGanttEntry<T> child)
child
- The child which was added, had its name updated or null if the child was deleted.public void completionUpdated()
public void childCompletionUpdated(DefaultGanttEntry<T> child)
child
- The child which was added, had its completion updated or null if the child was deleted.public double getCompletion()
GanttEntry
getCompletion
in interface GanttEntry<T>
public void setCompletion(double completion)
MutableGanttEntry
setCompletion
in interface MutableGanttEntry<T>
completion
- The new completion for the GanttEntry.public ConverterContext getConverterContextAt(int columnIndex)
Row
columnIndex
.
getConverterContextAt
in interface Row
getConverterContextAt
in class AbstractExpandableRow
columnIndex
- the column index
public Object getValueAt(int columnIndex)
Row
columnIndex
getValueAt
in interface Row
columnIndex
- the column whose value to be queried
public Class<?> getCellClassAt(int columnIndex)
Row
columnIndex
.
getCellClassAt
in interface Row
getCellClassAt
in class AbstractExpandableRow
columnIndex
- the column index
public void setValueAt(Object value, int columnIndex)
Row
columnIndex
.
setValueAt
in interface Row
setValueAt
in class AbstractExpandableRow
value
- the new valuecolumnIndex
- the column whose value is to be changedRow.getValueAt(int)
,
Row.isCellEditable(int)
public boolean isCellEditable(int columnIndex)
Row
columnIndex
is editable. Otherwise, setValueAt
on the cell
will not change the value of that cell.
isCellEditable
in interface Row
isCellEditable
in class AbstractExpandableRow
columnIndex
- the column whose value to be queried
Row.setValueAt(java.lang.Object, int)
public boolean isRangeEditable()
isRangeEditable
in interface MutableGanttEntry<T>
public boolean isCompletionEditable()
isCompletionEditable
in interface MutableGanttEntry<T>
public List<?> getChildren()
Expandable
getChildren
in interface Expandable
public void setChildren(List<?> children)
AbstractExpandable.addChild(Object)
instead. Nor should you use getChildren().add(...) because
both setChildren and getChildren().add will not notify the TreeTableModel about the change.
setChildren
in interface Expandable
children
- the new childrengetChildEntries()
public List<GanttEntry<T>> getSubEntries()
SubEntryGanttEntry
getSubEntries
in interface SubEntryGanttEntry<T>
SubEntryGanttEntry.setSubEntries(java.util.List)
public void setSubEntries(List<GanttEntry<T>> subEntries)
SubEntryGanttEntry
setSubEntries
in interface SubEntryGanttEntry<T>
subEntries
- the sub entry arraypublic void addSubEntry(GanttEntry<T> entry)
SubEntryGanttEntry
addSubEntry
in interface SubEntryGanttEntry<T>
entry
- the sub entrySubEntryGanttEntry.removeSubEntry(GanttEntry)
public void removeSubEntry(GanttEntry<T> entry)
SubEntryGanttEntry
removeSubEntry
in interface SubEntryGanttEntry<T>
entry
- the sub entrypublic boolean isAdjusting()
GanttEntry
isAdjusting
in interface GanttEntry<T>
isAdjusting
in class AbstractExpandable
public void setAdjusting(boolean adjusting)
MutableGanttEntry
setAdjusting
in interface MutableGanttEntry<T>
setAdjusting
in class AbstractExpandable
adjusting
- true or false.public String toString()
toString
in class Object
|
JIDE 3.5.15 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |