All Packages This Package Class Hierarchy Class Search Index
Class bmsi.fsp.FSComponent
java.lang.Object
|
+----bmsi.fsp.PWin
|
+----bmsi.fsp.FSComponent
abstract class FSComponent
extends bmsi.fsp.PWin
implements bmsi.fsp.Focus,
java.awt.peer.ComponentPeer
{
// Fields 4
int posx;
int posy;
protected Component target;
protected FSToolkit toolkit;
// Constructors 1
protected FSComponent(Component, FSToolkit);
// Methods 41
protected static char getAttr(int, int);
public int checkImage(Image, int, int, ImageObserver);
public Image createImage(int, int);
public Image createImage(ImageProducer);
public final void disable();
public void dispose();
public final void enable();
protected void finalize();
public void gainFocus();
protected char getAttr(int);
public ColorModel getColorModel();
public FontMetrics getFontMetrics(Font);
public Graphics getGraphics();
public Point getLocationOnScreen();
public Dimension getMinimumSize();
public Dimension getPreferredSize();
public Toolkit getToolkit();
public void handleEvent(AWTEvent);
public final boolean handleEvent(Event);
public final void hide();
protected void initialize();
public boolean isFocusTraversable();
public void loseFocus();
public final Dimension minimumSize();
public void paint(int, int, int, int);
public abstract void paint(Graphics);
final int pixelFromColor(Color);
public void postKey(int);
public final Dimension preferredSize();
public boolean prepareImage(Image, int, int, ImageObserver);
public void print(Graphics);
public void repaint(long, int, int, int, int);
public void requestFocus();
public final void reshape(int, int, int, int);
public void setBackground(Color);
public void setBounds(int, int, int, int);
public void setCursor(Cursor);
public void setEnabled(boolean);
public void setFont(Font);
public void setForeground(Color);
public final void show();
}
- Extended By:
- FSButton, FSContainer, FSLabel
protected Component target
protected FSToolkit toolkit
int posx
int posy
protected FSComponent(Component comp,
FSToolkit toolkit)
protected char getAttr(int fg)
Return text attribute based on foreground and background
"color"s.
protected static char getAttr(int fg,
int bg)
protected void initialize()
This and all derived peer classes must define initialize() to copy
all relevant attributes from the target component.
protected void finalize()
- Overrides:
- finalize in class Object
public void dispose()
- Implements:
- dispose in interface ComponentPeer
public void setEnabled(boolean a)
- Implements:
- setEnabled in interface ComponentPeer
public abstract void paint(Graphics g)
- Implements:
- paint in interface ComponentPeer
public void paint(int x,
int y,
int w,
int h)
Implement paint for Pwin.
- Overrides:
- paint in class PWin
public void repaint(long ms,
int x,
int y,
int w,
int h)
Add rectangle to list of areas to be repainted in ms time.
- Implements:
- repaint in interface ComponentPeer
See Also:
TUICanvas
public void print(Graphics g)
- Implements:
- print in interface ComponentPeer
public Point getLocationOnScreen()
- Implements:
- getLocationOnScreen in interface ComponentPeer
public void setBounds(int x,
int y,
int w,
int h)
Set component location by quantizing scaled coords to physical
coords.
- Overrides:
- setBounds in class PWin
- Implements:
- setBounds in interface ComponentPeer
public boolean isFocusTraversable()
Since most ASCII terminals don't have a mouse, most components
need to be tabbed to to be useful.
- Implements:
- isFocusTraversable in interface ComponentPeer
public Dimension getMinimumSize()
- Implements:
- getMinimumSize in interface ComponentPeer
public Dimension getPreferredSize()
- Implements:
- getPreferredSize in interface ComponentPeer
public ColorModel getColorModel()
- Implements:
- getColorModel in interface ComponentPeer
public Toolkit getToolkit()
- Implements:
- getToolkit in interface ComponentPeer
public Graphics getGraphics()
- Implements:
- getGraphics in interface ComponentPeer
public FontMetrics getFontMetrics(Font font)
- Implements:
- getFontMetrics in interface ComponentPeer
final int pixelFromColor(Color c)
public void setCursor(Cursor cursor)
- Implements:
- setCursor in interface ComponentPeer
public void setForeground(Color c)
- Implements:
- setForeground in interface ComponentPeer
public void setBackground(Color c)
- Implements:
- setBackground in interface ComponentPeer
public void setFont(Font f)
Our TUI has only one font for now.
- Implements:
- setFont in interface ComponentPeer
public void requestFocus()
- Implements:
- requestFocus in interface ComponentPeer
public Image createImage(ImageProducer prod)
- Implements:
- createImage in interface ComponentPeer
public Image createImage(int w,
int h)
- Implements:
- createImage in interface ComponentPeer
public boolean prepareImage(Image img,
int w,
int h,
ImageObserver obs)
- Implements:
- prepareImage in interface ComponentPeer
public int checkImage(Image img,
int w,
int h,
ImageObserver obs)
- Implements:
- checkImage in interface ComponentPeer
public void handleEvent(AWTEvent e)
- Implements:
- handleEvent in interface ComponentPeer
public final boolean handleEvent(Event e)
public final void reshape(int x,
int y,
int w,
int h)
- Implements:
- reshape in interface ComponentPeer
public final void show()
- Implements:
- show in interface ComponentPeer
public final void hide()
- Implements:
- hide in interface ComponentPeer
public final void enable()
- Implements:
- enable in interface ComponentPeer
public final void disable()
- Implements:
- disable in interface ComponentPeer
public final Dimension minimumSize()
- Implements:
- minimumSize in interface ComponentPeer
public final Dimension preferredSize()
- Implements:
- preferredSize in interface ComponentPeer
public void postKey(int k)
Translate terminfo key to a KeyEvent. Called for each terminfo key.
Can use terminfo keys directly
to implement L&F, otherwise keys are translated to java.awt.KeyEvent.
- Implements:
- postKey in interface Focus
public void loseFocus()
- Implements:
- loseFocus in interface Focus
public void gainFocus()
- Implements:
- gainFocus in interface Focus
All Packages This Package Class Hierarchy Class Search Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7