|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.sqlpower.architect.swingui.PlayPenComponent
public abstract class PlayPenComponent
PlayPenComponent is the base class for a component that can live in the playpen's content pane.
| Field Summary | |
|---|---|
protected java.awt.Color |
backgroundColor
|
protected boolean |
componentPreviouslySelected
|
protected java.awt.Color |
foregroundColor
|
protected boolean |
selected
A selected component is one that the user has clicked on. |
| Constructor Summary | |
|---|---|
protected |
PlayPenComponent(PlayPenContentPane parent)
|
| Method Summary | |
|---|---|
void |
addPropertyChangeListener(java.beans.PropertyChangeListener l)
Adds a property change listener to the existing list. |
void |
addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener l)
Adds a property change listener for a specific property. |
void |
addSelectionListener(SelectionListener l)
|
boolean |
contains(java.awt.Point p)
|
void |
firePropertyChange(java.beans.PropertyChangeEvent e)
|
protected void |
firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
Notifies property change listeners of a property change event. |
protected void |
fireSelectionEvent(SelectionEvent e)
|
java.awt.Color |
getBackgroundColor()
|
java.awt.Rectangle |
getBounds()
Returns a copy of this component's bounding rectangle. |
java.awt.Rectangle |
getBounds(java.awt.Rectangle r)
Sets the given rectangle to be identical to this component's bounding box. |
java.awt.Font |
getFont()
|
java.awt.FontMetrics |
getFontMetrics(java.awt.Font f)
|
java.awt.font.FontRenderContext |
getFontRenderContext()
|
java.awt.Color |
getForegroundColor()
|
int |
getHeight()
|
java.awt.Insets |
getInsets()
|
java.awt.Point |
getLocation()
|
java.awt.Point |
getLocation(java.awt.Point p)
Copies this component's location into the given point object. |
abstract java.lang.Object |
getModel()
|
abstract java.lang.String |
getName()
Returns the user-visible name for this component--often the same as getModel().getName(), but this depends entirely on the subclass's idea of what in the model constitutes its name. |
PlayPenContentPane |
getParent()
|
PlayPen |
getPlayPen()
|
javax.swing.JPopupMenu |
getPopup()
Returns a component specific popup menu. |
java.awt.Point |
getPreferredLocation()
The revalidate() call uses this to determine the component's correct location. |
java.awt.Dimension |
getPreferredSize()
|
java.awt.Dimension |
getSize()
|
java.lang.String |
getToolTipText()
|
PlayPenComponentUI |
getUI()
|
int |
getWidth()
|
int |
getX()
|
int |
getY()
|
abstract void |
handleMouseEvent(java.awt.event.MouseEvent evt)
Performs the component specific actions for the given MouseEvent. |
boolean |
isOpaque()
|
boolean |
isSelected()
See selected. |
void |
paint(java.awt.Graphics2D g2)
|
void |
removePropertyChangeListener(java.beans.PropertyChangeListener l)
Removes a specific property change listener from the existing list. |
void |
removeSelectionListener(SelectionListener l)
|
void |
repaint()
Forwards to repaint(Rectangle). |
void |
repaint(long tm,
int x,
int y,
int width,
int height)
Tells the owning PlayPen to repaint the given region. |
void |
repaint(java.awt.Rectangle r)
Forwards to repaint(long,int,int,int,int). |
void |
revalidate()
Translates this request into a call to PlayPen.repaint(Rectangle). |
void |
setBackgroundColor(java.awt.Color c)
|
void |
setBounds(int x,
int y,
int width,
int height)
See setBoundsImpl. |
protected void |
setBoundsImpl(int x,
int y,
int width,
int height)
Updates the bounds of this component, then issues a repaint to the PlayPen which covers the old bounds of this component. |
void |
setForegroundColor(java.awt.Color c)
|
void |
setInsets(java.awt.Insets insets)
|
void |
setLocation(int x,
int y)
Updates the on-screen location of this component. |
void |
setLocation(java.awt.Point point)
Updates the on-screen location of this component. |
void |
setOpaque(boolean opaque)
|
void |
setSelected(boolean isSelected,
int multiSelectType)
Tells this component it is selected or deselected. |
void |
setSize(java.awt.Dimension size)
|
void |
setToolTipText(java.lang.String toolTipText)
|
void |
setUI(PlayPenComponentUI ui)
|
void |
showPopup(java.awt.Point p)
Shows the component's popup menu on the PlayPen that owns this component because it doesn't work to show it on this component, which is not really part of the swing hierarchy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.awt.Color backgroundColor
protected java.awt.Color foregroundColor
protected boolean selected
protected boolean componentPreviouslySelected
| Constructor Detail |
|---|
protected PlayPenComponent(PlayPenContentPane parent)
| Method Detail |
|---|
public PlayPen getPlayPen()
public PlayPenComponentUI getUI()
public void setUI(PlayPenComponentUI ui)
public void showPopup(java.awt.Point p)
getPopup().
p - the point (relative to this component's top-left corner) to
show it at.public javax.swing.JPopupMenu getPopup()
public void revalidate()
protected void setBoundsImpl(int x,
int y,
int width,
int height)
All methods that affect the bounds rectangle should do so by calling this method.
public void setBounds(int x,
int y,
int width,
int height)
public java.awt.Rectangle getBounds()
public java.awt.Rectangle getBounds(java.awt.Rectangle r)
r - An existing rectangle. If null, this method creates a new rectangle for you.
public java.awt.Dimension getSize()
public java.awt.Point getPreferredLocation()
public java.awt.Point getLocation()
public java.awt.Point getLocation(java.awt.Point p)
p - A point that this method will modify. If you pass in null, this method will
create a new point for you.
public void setLocation(java.awt.Point point)
public void setLocation(int x,
int y)
public void setSize(java.awt.Dimension size)
public void repaint()
repaint(Rectangle).
public void repaint(java.awt.Rectangle r)
repaint(long,int,int,int,int).
public abstract java.lang.String getName()
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
public void addPropertyChangeListener(java.lang.String propertyName,
java.beans.PropertyChangeListener l)
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
protected void firePropertyChange(java.lang.String propName,
java.lang.Object oldValue,
java.lang.Object newValue)
public void firePropertyChange(java.beans.PropertyChangeEvent e)
PlayPenComponent.firePropertyChange()public int getX()
public int getY()
public int getWidth()
public int getHeight()
public java.awt.Insets getInsets()
public void setInsets(java.awt.Insets insets)
public void repaint(long tm,
int x,
int y,
int width,
int height)
public boolean isOpaque()
public void setOpaque(boolean opaque)
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color c)
public java.awt.Color getForegroundColor()
public void setForegroundColor(java.awt.Color c)
public java.lang.String getToolTipText()
public void setToolTipText(java.lang.String toolTipText)
public java.awt.Font getFont()
public java.awt.FontMetrics getFontMetrics(java.awt.Font f)
public java.awt.font.FontRenderContext getFontRenderContext()
public boolean contains(java.awt.Point p)
public void paint(java.awt.Graphics2D g2)
public java.awt.Dimension getPreferredSize()
public abstract java.lang.Object getModel()
public PlayPenContentPane getParent()
public abstract void handleMouseEvent(java.awt.event.MouseEvent evt)
public final void addSelectionListener(SelectionListener l)
addSelectionListener in interface Selectablepublic final void removeSelectionListener(SelectionListener l)
removeSelectionListener in interface Selectableprotected final void fireSelectionEvent(SelectionEvent e)
public boolean isSelected()
selected.
isSelected in interface Selectable
public void setSelected(boolean isSelected,
int multiSelectType)
See selected.
setSelected in interface SelectableisSelected - The new selection state for this componentmultiSelectType - One of the type codes from SelectionEvent.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||