Package org.apache.pivot.wtk.text
Interface ElementListener
-
- All Known Implementing Classes:
ElementListener.Adapter
,ElementListener.Listeners
public interface ElementListener
Element listener interface.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
ElementListener.Adapter
Deprecated.Since 2.1 and Java 8 the interface itself has default implementations.static class
ElementListener.Listeners
Element listeners.
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
backgroundColorChanged(Element element, java.awt.Color previousBackgroundColor)
Called when the background color has changed.default void
fontChanged(Element element, java.awt.Font previousFont)
Called when the font has changed.default void
foregroundColorChanged(Element element, java.awt.Color previousForegroundColor)
Called when the foreground color has changed.default void
nodeInserted(Element element, int index)
Called when a node has been inserted into an element.default void
nodesRemoved(Element element, int index, Sequence<Node> nodes)
Called when nodes have been removed from an element.default void
strikethroughChanged(Element element)
Called when strikethrough style has changed.default void
underlineChanged(Element element)
Called when underline style has changed.
-
-
-
Method Detail
-
nodeInserted
default void nodeInserted(Element element, int index)
Called when a node has been inserted into an element.- Parameters:
element
- The element that has changed.index
- Where in the element's node sequence the new one was inserted.
-
nodesRemoved
default void nodesRemoved(Element element, int index, Sequence<Node> nodes)
Called when nodes have been removed from an element.- Parameters:
element
- The element that changed.index
- The starting index of where nodes were removed.nodes
- The actual sequence of removed nodes.
-
fontChanged
default void fontChanged(Element element, java.awt.Font previousFont)
Called when the font has changed.- Parameters:
element
- The element that changed.previousFont
- What the font used to be.
-
backgroundColorChanged
default void backgroundColorChanged(Element element, java.awt.Color previousBackgroundColor)
Called when the background color has changed.- Parameters:
element
- The element that changed.previousBackgroundColor
- What the background color was before the change.
-
foregroundColorChanged
default void foregroundColorChanged(Element element, java.awt.Color previousForegroundColor)
Called when the foreground color has changed.- Parameters:
element
- The element whose color changed.previousForegroundColor
- The old foreground color.
-
underlineChanged
default void underlineChanged(Element element)
Called when underline style has changed.- Parameters:
element
- The element that changed.
-
strikethroughChanged
default void strikethroughChanged(Element element)
Called when strikethrough style has changed.- Parameters:
element
- The element that changed.
-
-