[VCLab-Main] [Software] [HotEqn] [sHotEqnComponent]

java.lang.Object
|
+----java.awt.Component
|
+----javax.swing.JComponent
|
+----atp.sHotEqn
| Constructors | Explanation |
|---|---|
public sHotEqn() |
Construtor without any initial equation. |
public sHotEqn(String equation) |
Construtor with initial equation to display. |
public sHotEqn(String equation,
JApplet app, String name)
|
Construtor with initial equation to display in an applet context. name is the applet name. |
| Method / Syntax | Explanation |
|---|---|
public void setEquation(String equation) |
Sets the current equation. |
public String getEquation() |
Returns the current equation. |
public void setDebug(boolean debug) |
Switches debug mode on and off. The component will print debug information to the console while working. |
public boolean isDebug() |
Returns if the debug mode is on or off. |
public void setFontname(String fontname) |
Sets one of the fonts available in java. Note: the font for Greek letters and all symbols cannot be changed. |
public String getFontname() |
Returns the current fontname. |
public void setFontsizes(int gsize1,
int gsize2,
int gsize3,
int gsize4)
|
Sets the fontsizes for rendering. Possible values are 18, 14, 16, 12, 10 and 8. |
public void setBackground(Color BGColor)
|
Sets the background color. |
public Color getBackground()
|
Returns the used background color. |
public void setForeground(Color FGColor)
|
Sets the foreground color. |
public Color getForeground()
|
Returns the used foreground color. |
public void setBorderColor(Color border) |
Sets the color for the optional border. |
public Color getBorderColor() |
Returns the color of the optional border. |
public void setBorder(boolean borderB) |
Switches the border on and off. |
public boolean isBorder() |
Returns wether or not a border is displayed. |
public void setRoundRectBorder(boolean borderB) |
Switches between a round and a rectangular
border. TRUE: round border FALSE: rectangular border |
public boolean isRoundRectBorder() |
Returns if the border is round or rectangular. |
public void setEnvColor(Color env) |
Sets the color for the environment. Only useful if border is round. |
public Color getEnvColor() |
Returns the color of the environment. |
public void setHAlign(String halign) |
Sets the horizontal alignment. Possible values are: left, center and right. |
public String getHAlign() |
Returns the horizontal alignment of the equation. |
public void setVAlign(String valign) |
Sets the vertical alignment. Possible values are: top, middle and bottom. |
public String getVAlign() |
Returns the vertical alignment of the equation. |
public void setEditable(boolean editableB) |
Makes the component almost editable. Parts
of the displayed equation are selectable when editable is set true. This is turned on by default. |
public boolean isEditable() |
Returns wether or not the equation if editable (selectable). |
public String getSelectedArea() |
Return the selected area text of an expression. The selection is performed by pressing left mouse button down, dragging and mouse button up. The area pointed between button down and up is selected. |
public Dimension getPreferredSize()
|
Returns the preferred size required to display the whole equation. |
public Dimension getMinimumSize()
|
Returns the minimum size required to display the whole equation. This method return the same value as getPreferredSize |
public Dimension getSizeof(String equation) |
Returns the size required to display the given equation. |
public void
addActionListener(ActionListener
listener)
|
Adds the specified action listener to recieve action events from this text field. |
public void
removeActionListener(ActionListener
listener)
|
Removes the specified action listener to recieve action events from this text field. |
public Image getImage() |
Returns the Image object of this component. If null returned, the image is not ready. |
The sHotEqn component is included together with applets and font files in a jar archive, which can be downloaded below.
[VCLab-Main] [Software] [HotEqn] [sHotEqnComponent]