All Packages  This Package  Class Hierarchy  Class Search  Index

Class bmsi.fsp.FSComponent
java.lang.Object
   |
   +----bmsi.fsp.PWin
           |
           +----bmsi.fsp.FSComponent

  Summary

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();
}


  Cross Reference

Extended By:
FSButton, FSContainer, FSLabel





  Fields

· target

Summary  |  Top
   protected Component target


· toolkit

Summary  |  Top
   protected FSToolkit toolkit


· posx

Summary  |  Top
   int posx


· posy

Summary  |  Top
   int posy


  Constructors

· FSComponent

Summary  |  Top

   protected FSComponent(Component comp, 
                         FSToolkit toolkit) 


  Methods

· getAttr

Summary  |  Top
   protected char getAttr(int fg) 

Return text attribute based on foreground and background "color"s.



· getAttr

Summary  |  Top
   protected static char getAttr(int fg, 
                                 int bg) 


· initialize

Summary  |  Top
   protected void initialize() 

This and all derived peer classes must define initialize() to copy all relevant attributes from the target component.



· finalize

Summary  |  Top
   protected void finalize() 
Overrides:
finalize in class Object


· dispose

Summary  |  Top
   public void dispose() 
Implements:
dispose in interface ComponentPeer


· setEnabled

Summary  |  Top
   public void setEnabled(boolean a) 
Implements:
setEnabled in interface ComponentPeer


· paint

Summary  |  Top
   public abstract void paint(Graphics g) 
Implements:
paint in interface ComponentPeer


· paint

Summary  |  Top
   public void paint(int x, 
                     int y, 
                     int w, 
                     int h) 

Implement paint for Pwin.

Overrides:
paint in class PWin


· repaint

Summary  |  Top
   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



· print

Summary  |  Top
   public void print(Graphics g) 
Implements:
print in interface ComponentPeer


· getLocationOnScreen

Summary  |  Top
   public Point getLocationOnScreen() 
Implements:
getLocationOnScreen in interface ComponentPeer


· setBounds

Summary  |  Top
   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


· isFocusTraversable

Summary  |  Top
   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


· getMinimumSize

Summary  |  Top
   public Dimension getMinimumSize() 
Implements:
getMinimumSize in interface ComponentPeer


· getPreferredSize

Summary  |  Top
   public Dimension getPreferredSize() 
Implements:
getPreferredSize in interface ComponentPeer


· getColorModel

Summary  |  Top
   public ColorModel getColorModel() 
Implements:
getColorModel in interface ComponentPeer


· getToolkit

Summary  |  Top
   public Toolkit getToolkit() 
Implements:
getToolkit in interface ComponentPeer


· getGraphics

Summary  |  Top
   public Graphics getGraphics() 
Implements:
getGraphics in interface ComponentPeer


· getFontMetrics

Summary  |  Top
   public FontMetrics getFontMetrics(Font font) 
Implements:
getFontMetrics in interface ComponentPeer


· pixelFromColor

Summary  |  Top
   final int pixelFromColor(Color c) 


· setCursor

Summary  |  Top
   public void setCursor(Cursor cursor) 
Implements:
setCursor in interface ComponentPeer


· setForeground

Summary  |  Top
   public void setForeground(Color c) 
Implements:
setForeground in interface ComponentPeer


· setBackground

Summary  |  Top
   public void setBackground(Color c) 
Implements:
setBackground in interface ComponentPeer


· setFont

Summary  |  Top
   public void setFont(Font f) 

Our TUI has only one font for now.

Implements:
setFont in interface ComponentPeer


· requestFocus

Summary  |  Top
   public void requestFocus() 
Implements:
requestFocus in interface ComponentPeer


· createImage

Summary  |  Top
   public Image createImage(ImageProducer prod) 
Implements:
createImage in interface ComponentPeer


· createImage

Summary  |  Top
   public Image createImage(int w, 
                            int h) 
Implements:
createImage in interface ComponentPeer


· prepareImage

Summary  |  Top
   public boolean prepareImage(Image img, 
                               int w, 
                               int h, 
                               ImageObserver obs) 
Implements:
prepareImage in interface ComponentPeer


· checkImage

Summary  |  Top
   public int checkImage(Image img, 
                         int w, 
                         int h, 
                         ImageObserver obs) 
Implements:
checkImage in interface ComponentPeer


· handleEvent

Summary  |  Top
   public void handleEvent(AWTEvent e) 
Implements:
handleEvent in interface ComponentPeer


· handleEvent

Summary  |  Top
   public final boolean handleEvent(Event e) 


· reshape

Summary  |  Top
   public final void reshape(int x, 
                             int y, 
                             int w, 
                             int h) 
Implements:
reshape in interface ComponentPeer


· show

Summary  |  Top
   public final void show() 
Implements:
show in interface ComponentPeer


· hide

Summary  |  Top
   public final void hide() 
Implements:
hide in interface ComponentPeer


· enable

Summary  |  Top
   public final void enable() 
Implements:
enable in interface ComponentPeer


· disable

Summary  |  Top
   public final void disable() 
Implements:
disable in interface ComponentPeer


· minimumSize

Summary  |  Top
   public final Dimension minimumSize() 
Implements:
minimumSize in interface ComponentPeer


· preferredSize

Summary  |  Top
   public final Dimension preferredSize() 
Implements:
preferredSize in interface ComponentPeer


· postKey

Summary  |  Top
   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


· loseFocus

Summary  |  Top
   public void loseFocus() 
Implements:
loseFocus in interface Focus


· gainFocus

Summary  |  Top
   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