|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.core.node.property.hilite.HiLiteHandler
public class HiLiteHandler
HiLiteHandler
implementation which receives hilite change
requests, answers, queries, and notifies registered listeners.
This implementation keeps a list of row keys only for the hilit items. Furthermore, an event is only sent for items whose status actually changed. The list of hilite keys is modified (delete or add keys) before the actual event is send.
Do NOT derive this class which intended to be final but can't due to the
historical DefaultHiLiteHandler
class.
HiLiteListener
Field Summary | |
---|---|
static String |
CLEAR_HILITE
Constant for the menu entry 'Clear HiLite'. |
static String |
HILITE
Constant for the Menu entry 'HiLite'. |
static String |
HILITE_SELECTED
Constant for the menu entry 'HiLite Selected'. |
static String |
UNHILITE_SELECTED
Constant for the menu entry 'UnHiLite Selected'. |
Constructor Summary | |
---|---|
HiLiteHandler()
Creates a new default hilite handler with an empty set of registered listeners and an empty set of hilit items. |
Method Summary | |
---|---|
void |
addHiLiteListener(HiLiteListener listener)
Appends a new hilite listener at the end of the list, if the listener has not been added before. |
void |
fireClearHiLiteEvent()
Resets the hilit status of all row IDs. |
void |
fireClearHiLiteEvent(KeyEvent event)
Informs all registered hilite listener to reset all hilit rows. |
protected void |
fireClearHiLiteEventInternal(KeyEvent event)
Deprecated. Replaced by fireClearHiLiteEvent(KeyEvent) |
void |
fireHiLiteEvent(KeyEvent event)
Informs all registered hilite listener to hilite the row keys contained in the key event. |
void |
fireHiLiteEvent(RowKey... ids)
Sets the status of the specified row IDs to 'hilit'. |
void |
fireHiLiteEvent(Set<RowKey> ids)
Sets the status of all specified row IDs in the set to 'hilit'. |
protected void |
fireHiLiteEventInternal(KeyEvent event)
Deprecated. Replaced by public method fireHiLiteEvent(KeyEvent) . |
void |
fireUnHiLiteEvent(KeyEvent event)
Informs all registered hilite listener to unhilite the row keys contained in the key event. |
void |
fireUnHiLiteEvent(RowKey... ids)
Sets the status of the specified row IDs to 'unhilit'. |
void |
fireUnHiLiteEvent(Set<RowKey> ids)
Sets the status of all specified row IDs in the set to 'unhilit'. |
protected void |
fireUnHiLiteEventInternal(KeyEvent event)
Deprecated. Replaced by fireUnHiLiteEvent(KeyEvent) . |
Set<RowKey> |
getHiLitKeys()
Returns a copy of all hilit keys. |
boolean |
isHiLit(RowKey... ids)
Returns true if the specified row IDs are hilit. |
void |
removeAllHiLiteListeners()
Removes all hilite listeners from the list. |
void |
removeHiLiteListener(HiLiteListener listener)
Removes the given hilite listener from the list. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String HILITE
public static final String HILITE_SELECTED
public static final String UNHILITE_SELECTED
public static final String CLEAR_HILITE
Constructor Detail |
---|
public HiLiteHandler()
Method Detail |
---|
public void addHiLiteListener(HiLiteListener listener)
listener
- the hilite listener to append to the listpublic void removeHiLiteListener(HiLiteListener listener)
listener
- the hilite listener to remove from the listpublic void removeAllHiLiteListeners()
public boolean isHiLit(RowKey... ids)
true
if the specified row IDs are hilit.
ids
- the row IDs to check the hilite status for
true
if all row IDs are hilit
IllegalArgumentException
- if this array or one of its elements is
null
.public void fireHiLiteEvent(RowKey... ids)
ids
- the row IDs to set hilited.public void fireUnHiLiteEvent(RowKey... ids)
ids
- the row IDs to set unhilitedpublic void fireHiLiteEvent(Set<RowKey> ids)
ids
- a set of row IDs to set hilited
IllegalArgumentException
- if the set or one of its elements is
null
public void fireUnHiLiteEvent(Set<RowKey> ids)
ids
- a set of row IDs to set unhilited
IllegalArgumentException
- if the set or one of its elements is
null
public void fireClearHiLiteEvent()
@Deprecated protected void fireHiLiteEventInternal(KeyEvent event)
fireHiLiteEvent(KeyEvent)
.
event
- Contains all rows keys to hilite.public void fireHiLiteEvent(KeyEvent event)
event
- Contains all rows keys to hilite.@Deprecated protected void fireUnHiLiteEventInternal(KeyEvent event)
fireUnHiLiteEvent(KeyEvent)
.
event
- Contains all rows keys to unhilite.public void fireUnHiLiteEvent(KeyEvent event)
event
- Contains all rows keys to unhilite.@Deprecated protected void fireClearHiLiteEventInternal(KeyEvent event)
fireClearHiLiteEvent(KeyEvent)
event
- the event fired for clear hilitepublic void fireClearHiLiteEvent(KeyEvent event)
event
- the event fired for clear hilitepublic Set<RowKey> getHiLitKeys()
getHiLitKeys()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |