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.


Constructor Index

 o TextMarkComponent()
Constructs an empty label.
 o TextMarkComponent(String)
Constructs a new label with the specified String of text.

Method Index

 o addItemListener(ItemListener)
Adds the specified item listener to recieve item events from this TextMarkComponent
 o getMark()
Gets the mark Variable for the text
 o getMarkBackgroundColor()
 o getMarkForegroundColor()
 o getMinimumSize()
 o getPreferredSize()
 o getSelectedObjects()
Returns the an array (length 1) containing the TextMarkComponent label or null if the Component is not selected.
 o getText()
Gets the text of this label.
 o mouseClicked(MouseEvent)
The mouse click on a TextMarkComponent ist mapped to an ItemEvent
 o mouseEntered(MouseEvent)
no functionality behind
 o mouseExited(MouseEvent)
no functionality behind
 o mousePressed(MouseEvent)
no functionality behind
 o mouseReleased(MouseEvent)
no functionality behind
 o paint(Graphics)
 o paramString()
Returns the parameter String of this label.
 o processEvent(AWTEvent)
Processes events on this checkbox.
 o processItemEvent(ItemEvent)
Processes item events occurring on this checkbox by dispatching them to any registered ItemListener objects.
 o removeItemListener(ItemListener)
Removes the specified item listener so that it no longer receives item events from this TextMarkComponent
 o setMark(boolean)
Set the mark for the text
 o setMarkBackgroundColor(Color)
 o setMarkForegroundColor(Color)
 o setText(String)
Sets the text for this label to the specified text.

Constructors

 o TextMarkComponent
  public TextMarkComponent()
Constructs an empty label.
 o TextMarkComponent
  public TextMarkComponent(String label)
Constructs a new label with the specified String of text.
Parameters:
label - the text that makes up the label

Methods

 o getPreferredSize
  public Dimension getPreferredSize()
 o getMinimumSize
  public Dimension getMinimumSize()
 o paint
  public void paint(Graphics g)
Overrides:
paint in class Canvas
 o getText
  public String getText()
Gets the text of this label.
See Also:
setText
 o 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
 o setMark
  public void setMark(boolean mark)
Set the mark for the text
 o getMark
  public boolean getMark()
Gets the mark Variable for the text
 o getMarkBackgroundColor
  public Color getMarkBackgroundColor()
 o setMarkBackgroundColor
  public void setMarkBackgroundColor(Color newMarkColor)
 o getMarkForegroundColor
  public Color getMarkForegroundColor()
 o setMarkForegroundColor
  public void setMarkForegroundColor(Color newMarkColor)
 o addItemListener
  public void addItemListener(ItemListener l)
Adds the specified item listener to recieve item events from this TextMarkComponent
Parameters:
l - the item listener
 o 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
 o 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
 o mouseClicked
  public void mouseClicked(MouseEvent e)
The mouse click on a TextMarkComponent ist mapped to an ItemEvent
 o mousePressed
  public void mousePressed(MouseEvent e)
no functionality behind
 o mouseReleased
  public void mouseReleased(MouseEvent e)
no functionality behind
 o mouseEntered
  public void mouseEntered(MouseEvent e)
no functionality behind
 o mouseExited
  public void mouseExited(MouseEvent e)
no functionality behind
 o 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
 o 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
 o paramString
  protected String paramString()
Returns the parameter String of this label.
Overrides:
paramString in class Component