|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
jsky.util.gui.XYDisplay
public class XYDisplay
This widget displays a pair of coordinates with given labels.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JPanel |
---|
JPanel.AccessibleJPanel |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
---|---|
protected JLabel |
xLabel
|
protected JTextField |
xValue
|
protected JLabel |
yLabel
|
protected JTextField |
yValue
|
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
XYDisplay()
Construct an X,Y display with the default labels "X" and "Y". |
|
XYDisplay(String xLabelStr,
String yLabelStr)
Construct an X,Y display with the given labels. |
Method Summary | |
---|---|
JLabel |
getXLabel()
Return the widget displaying X label |
JTextField |
getXValue()
Return the widget displaying X value |
JLabel |
getYLabel()
Return the widget displaying Y label |
JTextField |
getYValue()
Return the widget displaying Y value |
static void |
main(String[] args)
test main: usage: java LabelEntry |
void |
set(Point2D.Double p)
Set the X,Y values to display. |
protected void |
setupLabel(JLabel l)
Set properties for displaying a label |
protected void |
setupTextField(JTextField t)
Set properties for displaying a value text field |
void |
setValueWidth(int w)
Set the value width in pixels |
void |
setX(double d)
Set the value to display for X |
void |
setX(String s)
Set the value to display for X |
void |
setY(double d)
Set the value to display for Y |
void |
setY(String s)
Set the value to display for Y |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected JLabel xLabel
protected JLabel yLabel
protected JTextField xValue
protected JTextField yValue
Constructor Detail |
---|
public XYDisplay(String xLabelStr, String yLabelStr)
xLabelStr
- the label for the X valuexLabelStr
- the label for the Y valuepublic XYDisplay()
Method Detail |
---|
protected void setupLabel(JLabel l)
protected void setupTextField(JTextField t)
public void setValueWidth(int w)
public void setX(String s)
public void setX(double d)
public void setY(String s)
public void setY(double d)
public void set(Point2D.Double p)
public JLabel getXLabel()
public JLabel getYLabel()
public JTextField getXValue()
public JTextField getYValue()
public static void main(String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |