Horus Doc || Java GUI Reference || Doxygen's quick Index  

MachineElement Class Reference

Inheritance diagram for MachineElement::

BpoElement GlobalOpElement InputElement InquiryElement LoadElement OutputElement PlayElement TextElement TrashElement TVElement UpoElement VideoLoadElement ViewElement List of all members.

Public Methods

ImageSocket createInputSocket (int x, int y)
ImageSocket createOutputSocket (int x, int y)
PropertyComponent createPropertyComponent (String title, int x, int y, int width)
PropertyComponent createPropertyComponent (PropertyDialog dlg, int x, int y, int width)
JComponent setMachineImage (Image img, int x, int y, int w, int h)
KeyComponent createKeyComponent (int x, int y)
DisplayComponent createDisplayComponent (int x, int y, int w, int h)
void turnOff (String reason)
void init ()

Public Attributes

final Integer SOCKET_LAYER = new Integer(10)
final Integer MACHINE_LAYER = new Integer(20)
final Integer PROP_LAYER = new Integer(30)
final Integer BUITEN_LAYER = new Integer(40)

Protected Methods

void doInit ()

Member Function Documentation

ImageSocket MachineElement::createInputSocket int    x,
int    y
[inline]
 

00023 {
00024     ImageSocket s = new ImageSocket(true);
00025     s.setLocation(x, y);
00026     add(s, SOCKET_LAYER);
00027     return s;
00028 }

ImageSocket MachineElement::createOutputSocket int    x,
int    y
[inline]
 

00031 {
00032     ImageSocket s = new ImageSocket(false);
00033     s.setLocation(x, y);
00034     add(s, SOCKET_LAYER);
00035     return s;
00036 }

PropertyComponent MachineElement::createPropertyComponent String    title,
int    x,
int    y,
int    width
[inline]
 

00040 {
00041     PropertyComponent p = new PropertyComponent(title);
00042     p.setBounds(x, y, width, 16);
00043     add(p, PROP_LAYER);
00044     return p;
00045 }

PropertyComponent MachineElement::createPropertyComponent PropertyDialog    dlg,
int    x,
int    y,
int    width
[inline]
 

00049 {
00050     PropertyComponent p = new PropertyComponent(dlg);
00051     p.setBounds(x, y, width, 16);
00052     add(p, PROP_LAYER);
00053     return p;
00054 }

JComponent MachineElement::setMachineImage Image    img,
int    x,
int    y,
int    w,
int    h
[inline]
 

00057 {
00058     final Image image = img;
00059 
00060     JComponent machine = new JComponent() {
00061         public void paint(Graphics g) { g.drawImage(image, 0, 0, this); }
00062     };
00063     machine.setBounds(x, y, w, h);
00064     add(machine, MACHINE_LAYER);
00065     return machine;
00066 }

KeyComponent MachineElement::createKeyComponent int    x,
int    y
[inline]
 

00069 {
00070     KeyComponent k = new KeyComponent();
00071     k.setLocation(x, y);
00072     add(k, SOCKET_LAYER);
00073     return k;
00074 }

DisplayComponent MachineElement::createDisplayComponent int    x,
int    y,
int    w,
int    h
[inline]
 

00077 {
00078     DisplayComponent display = new DisplayComponent();
00079     display.setBounds(x, y, w, h);
00080     add(display, PROP_LAYER);
00081     return display;
00082 }

void MachineElement::turnOff String    reason [inline]
 

00085 {
00086     final Image image = Images.buiten;
00087 
00088     JComponent off = new JComponent() {
00089         public void paint(Graphics g) {
00090             g.drawImage(image, 0, 0, this);
00091         }
00092     };
00093     off.setBounds(getSize().width/2-32,getSize().height/2-25, 65, 49);
00094     off.setToolTipText(reason);
00095     add(off, BUITEN_LAYER);
00096 }

void MachineElement::init   [inline]
 

00099 {
00100     Thread t = new Thread() {
00101         public void run() { doInit(); }
00102     };
00103     t.start();
00104 }

void MachineElement::doInit   [inline, protected]
 

Reimplemented in BpoElement, GlobalOpElement, InputElement, LoadElement, OutputElement, TVElement, UpoElement, and VideoLoadElement.

00107 {
00108 }


Member Data Documentation

final Integer MachineElement::SOCKET_LAYER = new Integer(10)
 

final Integer MachineElement::MACHINE_LAYER = new Integer(20)
 

final Integer MachineElement::PROP_LAYER = new Integer(30)
 

final Integer MachineElement::BUITEN_LAYER = new Integer(40)
 


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 15:11:23 2003 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001