cz.cuni.jagrlib.gui
Class PlugGUIImproved

java.lang.Object
  extended by cz.cuni.jagrlib.gui.PlugGUI
      extended by cz.cuni.jagrlib.gui.PlugGUIImproved

public class PlugGUIImproved
extends PlugGUI

Concrete class for visual representation of a plug.

See Also:
PlugGUIImproved.java

Field Summary
static int PGI_ORIENTATION_EAST
          Other orientation of plug - east.
static int PGI_ORIENTATION_NORTH
          Other orientation of plug - north.
static int PGI_ORIENTATION_WEST
          Other orientation of plug - west.
 
Fields inherited from class cz.cuni.jagrlib.gui.PlugGUI
info, maxX, maxY, PGI_ORIENTATION_SOUTH
 
Constructor Summary
PlugGUIImproved(InfoPlug _infoP)
          Creates new PlugGUIImproved.
 
Method Summary
 boolean contains(int px, int py)
          Tests whether the given point lies on the plug.
 java.lang.String getToolTipText()
          Tooltip text for the plug.
 int getX()
          Gets relative x-coordinate of the plug.
 int getY()
          Gets relative y-coordinate of the plug.
 void movePlug(int nx, int ny)
          Moves the Plug.
 void paintItem(java.awt.Graphics g)
          Paint bonus graphics on module panel.
 void resize(int nx, int ny)
          The Plug's module was resized.
 void setOrientation(int _o)
          Sets orientation of the plug.
 
Methods inherited from class cz.cuni.jagrlib.gui.PlugGUI
getOrientaion
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PGI_ORIENTATION_WEST

public static final int PGI_ORIENTATION_WEST
Other orientation of plug - west.

See Also:
Constant Field Values

PGI_ORIENTATION_NORTH

public static final int PGI_ORIENTATION_NORTH
Other orientation of plug - north.

See Also:
Constant Field Values

PGI_ORIENTATION_EAST

public static final int PGI_ORIENTATION_EAST
Other orientation of plug - east.

See Also:
Constant Field Values
Constructor Detail

PlugGUIImproved

public PlugGUIImproved(InfoPlug _infoP)
Creates new PlugGUIImproved.

Parameters:
_infoP - Information about plug.
Method Detail

contains

public boolean contains(int px,
                        int py)
Tests whether the given point lies on the plug.

Specified by:
contains in class PlugGUI
Parameters:
px - x-coordinate.
py - y-coordinate.
Returns:
true if point lies on the plug.

getToolTipText

public java.lang.String getToolTipText()
Tooltip text for the plug.

Specified by:
getToolTipText in class PlugGUI

getX

public int getX()
Gets relative x-coordinate of the plug.

Specified by:
getX in class PlugGUI

getY

public int getY()
Gets relative y-coordinate of the plug.

Specified by:
getY in class PlugGUI

setOrientation

public void setOrientation(int _o)
Sets orientation of the plug.

Parameters:
_o - New orientation.

movePlug

public void movePlug(int nx,
                     int ny)
Moves the Plug.

Specified by:
movePlug in class PlugGUI
Parameters:
nx - X-coordinate offset (relative coordinate).
ny - Y-coordinate offset (relative coordinate).

resize

public void resize(int nx,
                   int ny)
The Plug's module was resized.

Specified by:
resize in class PlugGUI
Parameters:
nx - New module width.
ny - New module height.

paintItem

public void paintItem(java.awt.Graphics g)
Paint bonus graphics on module panel.

Specified by:
paintItem in class PlugGUI