Class TextMarkComponent
Class TextMarkComponent
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----TextMarkComponent
- public class TextMarkComponent
- extends Canvas
- implements MouseListener
A component that displays
a Text.
The Component can be marked.
-
TextMarkComponent()
- Constructs an empty label.
-
TextMarkComponent(String)
- Constructs a new label with the specified String of text.
-
addItemListener(ItemListener)
- Adds the specified item listener to recieve item events from
this TextMarkComponent
-
getMark()
- Gets the mark Variable for the text
-
getMarkBackgroundColor()
-
-
getMarkForegroundColor()
-
-
getMinimumSize()
-
-
getPreferredSize()
-
-
getSelectedObjects()
- Returns the an array (length 1) containing the TextMarkComponent
label or null if the Component is not selected.
-
getText()
- Gets the text of this label.
-
mouseClicked(MouseEvent)
- The mouse click on a TextMarkComponent ist mapped
to an ItemEvent
-
mouseEntered(MouseEvent)
- no functionality behind
-
mouseExited(MouseEvent)
- no functionality behind
-
mousePressed(MouseEvent)
- no functionality behind
-
mouseReleased(MouseEvent)
- no functionality behind
-
paint(Graphics)
-
-
paramString()
- Returns the parameter String of this label.
-
processEvent(AWTEvent)
- Processes events on this checkbox.
-
processItemEvent(ItemEvent)
- Processes item events occurring on this checkbox by
dispatching them to any registered ItemListener objects.
-
removeItemListener(ItemListener)
- Removes the specified item listener so that it no longer
receives item events from this TextMarkComponent
-
setMark(boolean)
- Set the mark for the text
-
setMarkBackgroundColor(Color)
-
-
setMarkForegroundColor(Color)
-
-
setText(String)
- Sets the text for this label to the specified text.
TextMarkComponent
public TextMarkComponent()
- Constructs an empty label.
TextMarkComponent
public TextMarkComponent(String label)
- Constructs a new label with the specified String of text.
- Parameters:
- label - the text that makes up the label
getPreferredSize
public Dimension getPreferredSize()
getMinimumSize
public Dimension getMinimumSize()
paint
public void paint(Graphics g)
- Overrides:
- paint in class Canvas
getText
public String getText()
- Gets the text of this label.
- See Also:
- setText
setText
public void setText(String label)
- Sets the text for this label to the specified text.
- Parameters:
- label - the text that makes up the label
- See Also:
- getText
setMark
public void setMark(boolean mark)
- Set the mark for the text
getMark
public boolean getMark()
- Gets the mark Variable for the text
getMarkBackgroundColor
public Color getMarkBackgroundColor()
setMarkBackgroundColor
public void setMarkBackgroundColor(Color newMarkColor)
getMarkForegroundColor
public Color getMarkForegroundColor()
setMarkForegroundColor
public void setMarkForegroundColor(Color newMarkColor)
addItemListener
public void addItemListener(ItemListener l)
- Adds the specified item listener to recieve item events from
this TextMarkComponent
- Parameters:
- l - the item listener
removeItemListener
public void removeItemListener(ItemListener l)
- Removes the specified item listener so that it no longer
receives item events from this TextMarkComponent
- Parameters:
- l - the item listener
getSelectedObjects
public Object[] getSelectedObjects()
- Returns the an array (length 1) containing the TextMarkComponent
label or null if the Component is not selected.
- See Also:
- ItemSelectable
mouseClicked
public void mouseClicked(MouseEvent e)
- The mouse click on a TextMarkComponent ist mapped
to an ItemEvent
mousePressed
public void mousePressed(MouseEvent e)
- no functionality behind
mouseReleased
public void mouseReleased(MouseEvent e)
- no functionality behind
mouseEntered
public void mouseEntered(MouseEvent e)
- no functionality behind
mouseExited
public void mouseExited(MouseEvent e)
- no functionality behind
processEvent
protected void processEvent(AWTEvent e)
- Processes events on this checkbox. If the event is an ItemEvent,
it invokes the handleItemEvent method, else it calls its
superclass's processEvent.
- Parameters:
- e - the event
processItemEvent
protected void processItemEvent(ItemEvent e)
- Processes item events occurring on this checkbox by
dispatching them to any registered ItemListener objects.
NOTE: This method will not be called unless item events
are enabled for this component; this happens when one of the
following occurs:
a) An ItemListener object is registered via addItemListener()
b) Item events are enabled via enableEvents()
- Parameters:
- e - the item event
- See Also:
- enableEvents
paramString
protected String paramString()
- Returns the parameter String of this label.
- Overrides:
- paramString in class Component