Package com.ribs.helpers
Class JButtonOrLabelHpr
- java.lang.Object
-
- com.ribs.RJHelper
-
- com.ribs.helpers.JButtonOrLabelHpr
-
- Direct Known Subclasses:
AbstractButtonHpr
,JLabelHpr
public class JButtonOrLabelHpr extends RJHelper
This class is the superclass for labels and buttons which handles attributes common to both classes.
-
-
Constructor Summary
Constructors Constructor Description JButtonOrLabelHpr()
Creates a new JButtonOrLabelHpr.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)
XML unarchival.int
getHorizontalAlignment(javax.swing.JComponent aComponent)
Standard button or label propertyint
getHorizontalTextPosition(javax.swing.JComponent aComponent)
Standard button or label propertyjavax.swing.Icon
getIcon(javax.swing.JComponent aComponent)
Returns the button or label icon.int
getIconTextGap(javax.swing.JComponent aComponent)
Standard button or label propertyjava.lang.String
getImageName(javax.swing.JComponent aComponent)
Returns the image name for this button's icon.java.lang.String
getText(javax.swing.JComponent aComponent)
Returns the text for the button or label.int
getVerticalAlignment(javax.swing.JComponent aComponent)
Standard button or label propertyint
getVerticalTextPosition(javax.swing.JComponent aComponent)
Standard button or label propertyvoid
setHorizontalAlignment(javax.swing.JComponent aComponent, int val)
Standard button or label propertyvoid
setHorizontalTextPosition(javax.swing.JComponent aComponent, int val)
Standard button or label propertyvoid
setIcon(javax.swing.JComponent aComponent, javax.swing.Icon anIcon)
Sets the button or label icon.void
setIconTextGap(javax.swing.JComponent aComponent, int val)
Standard button or label propertyvoid
setImageName(javax.swing.JComponent aComponent, java.lang.String aName)
Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.void
setText(javax.swing.JComponent aComponent, java.lang.String aString)
Sets the text for the button or label.void
setVerticalAlignment(javax.swing.JComponent aComponent, int val)
Standard button or label propertyvoid
setVerticalTextPosition(javax.swing.JComponent aComponent, int val)
Standard button or label propertyRXElement
toXML(javax.swing.JComponent aComponent, RXArchiver anArchiver)
XML archival.-
Methods inherited from class com.ribs.RJHelper
add, focusGained, focusLost, fromXMLDeep, get, getActionListener, getAutoscrolls, getAutosizing, getBackground, getBindKey, getBooleanValue, getBoolValue, getCallback, getChangeListener, getColorValue, getComponent, getComponentCount, getFloatValue, getFocusListener, getForeground, getIntValue, getMaster, getMaximumSize, getMinimumSize, getOwner, getRibHeight, getRibWidth, getRibX, getRibY, getSendActionOnFocusLost, getStringValue, getSubstitutionClassString, getValue, initInstance, isOpaque, newInstance, performBindKeyGet, performBindKeySet, sendAction, setAutoscrolls, setAutosizing, setBackground, setBindKey, setCallback, setForeground, setMaster, setMaximumSize, setMinimumSize, setOpaque, setOwner, setSendActionOnFocusLost, setSubstitutionClassString, setValue, setValue, setValue, setValue, setValue, setValue, setValue, takeFloatValue, takeIntValue, testOutBeanBag, toXMLDeep
-
-
-
-
Method Detail
-
getImageName
public java.lang.String getImageName(javax.swing.JComponent aComponent)
Returns the image name for this button's icon.
-
setImageName
public void setImageName(javax.swing.JComponent aComponent, java.lang.String aName)
Sets the image name for this button's icon and tries to set the icon by asking Ribs for the named icon.
-
getIcon
public javax.swing.Icon getIcon(javax.swing.JComponent aComponent)
Returns the button or label icon.
-
setIcon
public void setIcon(javax.swing.JComponent aComponent, javax.swing.Icon anIcon)
Sets the button or label icon.
-
getText
public java.lang.String getText(javax.swing.JComponent aComponent)
Returns the text for the button or label.
-
setText
public void setText(javax.swing.JComponent aComponent, java.lang.String aString)
Sets the text for the button or label.
-
getHorizontalAlignment
public int getHorizontalAlignment(javax.swing.JComponent aComponent)
Standard button or label property
-
setHorizontalAlignment
public void setHorizontalAlignment(javax.swing.JComponent aComponent, int val)
Standard button or label property
-
getVerticalAlignment
public int getVerticalAlignment(javax.swing.JComponent aComponent)
Standard button or label property
-
setVerticalAlignment
public void setVerticalAlignment(javax.swing.JComponent aComponent, int val)
Standard button or label property
-
getHorizontalTextPosition
public int getHorizontalTextPosition(javax.swing.JComponent aComponent)
Standard button or label property
-
setHorizontalTextPosition
public void setHorizontalTextPosition(javax.swing.JComponent aComponent, int val)
Standard button or label property
-
getVerticalTextPosition
public int getVerticalTextPosition(javax.swing.JComponent aComponent)
Standard button or label property
-
setVerticalTextPosition
public void setVerticalTextPosition(javax.swing.JComponent aComponent, int val)
Standard button or label property
-
getIconTextGap
public int getIconTextGap(javax.swing.JComponent aComponent)
Standard button or label property
-
setIconTextGap
public void setIconTextGap(javax.swing.JComponent aComponent, int val)
Standard button or label property
-
toXML
public RXElement toXML(javax.swing.JComponent aComponent, RXArchiver anArchiver)
XML archival.
-
fromXML
public void fromXML(javax.swing.JComponent aComponent, RXArchiver anArchiver, RXElement anElement)
XML unarchival.
-
-