yu.ac.bg.etf.javaqx.qswing
Class JQComponent

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.core.AbstractDisposable
      extended byyu.ac.bg.etf.javaqx.qswing.JQComponent
All Implemented Interfaces:
Disposable, JQComponentProperties
Direct Known Subclasses:
GLJQComponent, JQAbstractButton, JQComboBox, JQContainer, JQLabel, JQList, JQMenuItem, JQProgressBar, JQScrollBar, JQScrollPane, JQSeparator, JQSlider, JQSplitPane, JQTable, JQTextComponent, JQTextField, JQToolTip, JQTree

public abstract class JQComponent
extends AbstractDisposable
implements JQComponentProperties

The base class of all QSwing components.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
protected  EventListenerList listenerList
           
 
Fields inherited from interface yu.ac.bg.etf.javaqx.qswing.properties.JQComponentProperties
PROPERTY_BACKGROUND, PROPERTY_COMPONENT_ORIENTATION, PROPERTY_CONTEXT_MENU, PROPERTY_ENABLED, PROPERTY_FIXED_SIZE, PROPERTY_FOCUSABLE, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_INSETS, PROPERTY_LOCALE, PROPERTY_MAXIMUM_SIZE, PROPERTY_MINIMUM_SIZE, PROPERTY_NAME, PROPERTY_OPAQUE, PROPERTY_PREFERRED_SIZE, PROPERTY_RESOURCE_BUNDLE_NAME, PROPERTY_STATUS_TIP_TEXT, PROPERTY_STYLE_SHEET, PROPERTY_TOOL_TIP_TEXT, PROPERTY_VISIBLE, PROPERTY_WHATS_THIS_TEXT
 
Constructor Summary
protected JQComponent()
          Constructs new JQComponent object.
protected JQComponent(boolean initNative)
          Constructs new JQComponent object.
protected JQComponent(java.lang.String name)
          Constructs new JQComponent object.
 
Method Summary
 void addComponentListener(ComponentListener listener)
          Adds component listener.
 void addFocusListener(FocusListener listener)
          Adds focus listener.
 void addKeyListener(KeyListener listener)
          Adds key listener.
 void addMouseListener(MouseListener listener)
          Adds mouse listener.
 void addMouseMotionListener(MouseMotionListener listener)
          Adds mouse motion listener.
 void addMouseWheelListener(MouseWheelListener listener)
          Adds mouse wheel listener.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds property chage listener for all properties.
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Adds property chage listener for specified property.
protected  void disableEvents(long eventsToDisable)
          Disables the events specified by event mask parameter from being delivered to this component.
protected  void disposeComponent()
          Disposes the component.
protected  void disposeObject()
          Disposes the object.
protected  void enableEvents(long eventsToEnable)
          Enables the events specified by event mask parameter to be delivered to this component.
protected  boolean eventEnabled(long event)
          Returns true if the specified event is enabled.
protected  void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, byte oldValue, byte newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, char oldValue, char newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, double oldValue, double newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, float oldValue, float newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, long oldValue, long newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
          Fires a bound property change.
protected  void firePropertyChange(java.lang.String propertyName, short oldValue, short newValue)
          Fires a bound property change.
 Color getBackground()
          Returns background color of the component.
 Rectangle getBounds()
          Returns bounds of the component.
 java.lang.Object getClientProperty(java.lang.Object key)
          Returns the value of the property specified by the key.
 ComponentListener[] getComponentListeners()
          Returns component listeners.
 ComponentOrientation getComponentOrientation()
          Returns component orientation.
 JQMenu getContextMenu()
          Returns component's context menu.
 Cursor getCursor()
          Returns cursor.
protected  long getEventMask()
          Returns event mask.
 FocusListener[] getFocusListener()
          Returns focus listeners.
 Font getFont()
          Returns font of this component.
 FontMetrics getFontMetrics()
          Returns font metrics of the component's font.
 Color getForeground()
          Returns foreground color of the component.
 int getHeight()
          Returns current height of the component.
 Insets getInsets()
          Returns insets of this component.
 KeyListener[] getKeyListeners()
          Returns key listeners.
 java.util.Locale getLocale()
          Returns the locale of the component.
 Point getLocation()
          Returns location of the component.
 Dimension getMaximumSize()
          Returns maximum size of the component.
 Dimension getMinimumSize()
          Returns minimum size of the component.
 MouseListener[] getMouseListeners()
          Returns mouse listeners.
 MouseMotionListener[] getMouseMotionListeners()
          Returns mouse motion listeners.
 MouseWheelListener[] getMouseWheelListeners()
          Returns mouse wheel listeners.
 java.lang.String getName()
          Returns the name of the component.
 JQComponent[] getOwnedComponents()
          Return an array containing all the components this component currently owns.
 JQComponent getOwner()
          Returns the owner of the component.
 JQContainer getParent()
          Returns the parent of the component.
 Dimension getPreferredSize()
          Returns preferred size of the component.
 java.beans.PropertyChangeListener[] getPropertyChangeListeners()
          Returns property change listeners for all properties.
 java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
          Returns property chage listeners for specified property.
 java.lang.String getResourceBundleName()
          Returns resource bundle name.
 Dimension getSize()
          Returns the size of this component.
 java.lang.String getStatusTipText()
          Returns status tip text.
 StyleSheet getStyleSheet()
          Returns style sheet.
 java.lang.String getToolTipText()
          Returns tooltip text.
 java.lang.String getToolTipText(int x, int y)
          Returns tooltip text for the specified location.
 java.lang.String getWhatsThisText()
          Returns What's This text.
 int getWidth()
          Returns current width of the component.
 int getX()
          Returns current x coordinate.
 int getY()
          Returns current y coordinate.
 void invalidate()
          Invalidates the component.
 boolean isBackgroundSet()
          Returns true if the background color has been explicitly set.
 boolean isCursorSet()
          Returns true if the cursor is explicitly set.
 boolean isDisplayable()
          Returns true if the component can be displayed on the screen.
 boolean isEnabled()
          Returns true if the component is enabled.
 boolean isFocusable()
          Returns whether or not this component can be focused.
 boolean isFocusOwner()
          Returns true if this component is the focus owner.
 boolean isFontSet()
          Returns true if the font is explicitly set.
 boolean isForegroundSet()
          Returns true if the background color has been explicitly set.
 boolean isLeftToRight()
          Returns true if orientation is left-to-right.
 boolean isLocaleSet()
          Returns true if locale is explicitly set.
 boolean isOpaque()
          Returns true if component is opaque.
 boolean isOwnerOf(JQComponent component)
          Returns true if this component is owner of the specified component.
 boolean isPainting()
          Returns true if component is painting itself.
 boolean isResizable()
          Returns true if the component is resizable.
 boolean isResourceBundleNameSet()
          Returns true if resource bundle name is explicitly set.
 boolean isUpdatesEnabled()
          Returns true if updates are enabled.
 boolean isValid()
          Returns true if component is valid.
 boolean isVisible()
          Returns true if the component is visible.
 java.lang.Object localizeObject(java.lang.String key, java.lang.Object obj)
          Localizes specified object.
 java.lang.String localizeString(java.lang.String s)
          Returns localized string.
 java.lang.String localizeString(java.lang.String key, java.lang.String str)
          Localizes specified string.
 java.lang.String[] localizeStrings(java.lang.String key, java.lang.String[] strings)
          Localizes specified string array.
protected  void paintComponent(Graphics g)
          Paints the component.
protected  java.lang.String paramString()
          Returns parameters string.
protected  void processComponentEvent(ComponentEvent event)
          Process component event.
protected  void processContextMenuEvent(ContextMenuEvent event)
          Process context menu event.
protected  void processFocusEvent(FocusEvent event)
          Process focus event.
protected  void processKeyEvent(KeyEvent event)
          Process key event.
protected  void processMouseEvent(MouseEvent event)
          Process mouse event.
protected  void processMouseMotionEvent(MouseEvent event)
          Process mouse motion event.
protected  void processMouseWheelEvent(MouseWheelEvent event)
          Process mouse wheel event.
protected  void processStyleChange()
          Process style change.
 void putClientProperty(java.lang.Object key, java.lang.Object value)
          Puts key/value "client property".
 void removeComponentListener(ComponentListener listener)
          Removes component listener.
 void removeFocusListener(FocusListener listener)
          Removes focus listener.
 void removeKeyListener(KeyListener listener)
          Removes key listener.
 void removeMouseListener(MouseListener listener)
          Removes mouse listener.
 void removeMouseMotionListener(MouseMotionListener listener)
          Removes mouse motion listener.
 void removeMouseWheelListener(MouseWheelListener listener)
          Removes mouse wheel listener.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes property chage listener for all properties.
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
          Removes property chage listener for specified property.
 void removeStyleSheet()
          Removes style sheet.
 void repaint()
          Repaints the component.
 void repaint(int x, int y, int width, int height)
          Repaints the component region.
 void repaint(Rectangle region)
          Repaints the component region.
 void requestFocus()
          Requests the focus.
 void revalidate()
          Revalidates the component.
 void setBackground(Color background)
          Sets background color of the component.
 void setBounds(int x, int y, int width, int height)
          Moves and resizes the component.
 void setBounds(Rectangle bounds)
          Moves and resizes the component.
 void setComponentOrientation(ComponentOrientation orientation)
          Sets component orientation.
 JQMenu setContextMenu(JQMenu contextMenu)
          Sets component's context menu.
 void setCursor(Cursor cursor)
          Sets cursor.
 void setDefaultResourceBundleName()
          Sets default resource bundle name.
 void setDisplayable(boolean displayable)
          Sets whether or not the component can be displayed on the screen.
 void setEnabled(boolean enabled)
          Enables or disables the component.
 void setFixedSize(Dimension fixedSize)
          Sets fixed size.
 void setFixedSize(int width, int height)
          Sets fixed size.
 void setFocusable(boolean focusable)
          Sets focusable state of the component.
 void setFont(Font font)
          Sets component's font.
 void setForeground(Color foreground)
          Sets foreground color of the component.
 void setInsets(Insets insets)
          Sets insets for this component.
 void setInsets(int top, int left, int bottom, int right)
          Sets insets for this component.
 void setLeftToRightComponentOrientation()
          Sets left-to-right component orientation.
 void setLocale(java.util.Locale locale)
          Sets the locale of the component.
 void setLocation(int x, int y)
          Sets current location of the component.
 void setLocation(Point location)
          Sets current location of the component.
 void setMaximumSize(Dimension maximumSize)
          Sets maximum size.
 void setMaximumSize(int width, int height)
          Sets maximum size.
 void setMinimumSize(Dimension minimumSize)
          Sets minimum size.
 void setMinimumSize(int width, int height)
          Sets minimum size.
 void setName(java.lang.String name)
          Sets the name of the component.
 void setOpaque(boolean opaque)
          Sets whether or not component paints all background.
 void setPreferredSize(Dimension preferredSize)
          Sets preferred size of the component.
 void setPreferredSize(int width, int height)
          Sets preferred size of the component.
 void setResizable(boolean resizable)
          Sets resizable status.
 void setResourceBundleName(java.lang.String resourceBundleName)
          Sets resource bundle name.
 void setRightToLeftComponentOrientation()
          Sets right-to-left component orientation.
 void setSize(Dimension size)
          Sets size of the component.
 void setSize(int width, int height)
          Sets size of the component.
 void setStatusTipText(java.lang.String text)
          Sets status tip text.
 void setStyleSheet(java.lang.String styleSheetText)
          Sets style sheet.
 void setStyleSheet(StyleSheet styleSheet)
          Sets style sheet.
 void setToolTipText(java.lang.String text)
          Sets tooltip text.
 void setUpdatesEnabled(boolean enabled)
          Enables/disables updates.
 void setVisible(boolean visible)
          Sets new visibility state.
 void setWhatsThisText(java.lang.String text)
          Sets What's This text.
 java.lang.String toString()
          
 void unsetComponentOrientation()
          Unsets component orientation.
 void update()
          Updates the component.
 void update(int x, int y, int width, int height)
          Updates the component region.
 void update(Rectangle region)
          Updates the component region.
 void updateComponentOrientation()
          Updates components orientation using current locale.
 void updateLocalization()
          Updates localization.
 void validate()
          Validates the component.
 
Methods inherited from class yu.ac.bg.etf.javaqx.core.AbstractDisposable
addDisposeListener, dispose, disposedCheck, disposedErrorString, finalize, isDisposed, removeDisposeListener
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

listenerList

protected final EventListenerList listenerList
Constructor Detail

JQComponent

protected JQComponent()
Constructs new JQComponent object.


JQComponent

protected JQComponent(java.lang.String name)
Constructs new JQComponent object.

Parameters:
name - the component name

JQComponent

protected JQComponent(boolean initNative)
Constructs new JQComponent object.

WARNING: Do not call this constructor if you don't implement native constructor.

Parameters:
initNative - initialize native constructor
Method Detail

getName

public java.lang.String getName()
Returns the name of the component.

Returns:
the name of the component

setName

public void setName(java.lang.String name)
Sets the name of the component.

Parameters:
name - the component name

getOwner

public final JQComponent getOwner()
Returns the owner of the component. The component that disposes this component.

Returns:
the owner of the component

getParent

public final JQContainer getParent()
Returns the parent of the component. The component that contains this component.

Returns:
the parent of the component

isOwnerOf

public final boolean isOwnerOf(JQComponent component)
Returns true if this component is owner of the specified component.

Parameters:
component - the component to check
Returns:
true if this component is owner of the specified component

getOwnedComponents

public JQComponent[] getOwnedComponents()
Return an array containing all the components this component currently owns.

Returns:
an array containing all the components this component currently owns

getContextMenu

public JQMenu getContextMenu()
Returns component's context menu.

Returns:
context menu

setContextMenu

public JQMenu setContextMenu(JQMenu contextMenu)
Sets component's context menu.

Parameters:
contextMenu - the context menu
Returns:
old context menu

isDisplayable

public boolean isDisplayable()
Returns true if the component can be displayed on the screen.

NOTE: This method differs form the java.awt.Component corresponding method!

Returns:
true if the component can be displayed on the screen

setDisplayable

public void setDisplayable(boolean displayable)
Sets whether or not the component can be displayed on the screen.

Parameters:
displayable - if true, the component can be desplayed

isVisible

public boolean isVisible()
Returns true if the component is visible.

Returns:
true if the component is visible

setVisible

public void setVisible(boolean visible)
Sets new visibility state.

Parameters:
visible - the new visibility state

isEnabled

public boolean isEnabled()
Returns true if the component is enabled.

Returns:
true if the component is enabled

setEnabled

public void setEnabled(boolean enabled)
Enables or disables the component.

Parameters:
enabled - if true the component is enabled; otherwise the component is disabled

isFocusable

public boolean isFocusable()
Returns whether or not this component can be focused.

Returns:
whether or not this component can be focused

setFocusable

public void setFocusable(boolean focusable)
Sets focusable state of the component.

Parameters:
focusable - if true, the component can be focused

isFocusOwner

public boolean isFocusOwner()
Returns true if this component is the focus owner.

Returns:
true if this component is the focus owner

requestFocus

public void requestFocus()
Requests the focus.


getX

public int getX()
Returns current x coordinate.

Returns:
current x coordinate

getY

public int getY()
Returns current y coordinate.

Returns:
current y coordinate

getLocation

public Point getLocation()
Returns location of the component.

Returns:
location of the component

setLocation

public void setLocation(int x,
                        int y)
Sets current location of the component.

Parameters:
x - the new x coordinate of the component
y - the new y coordinate of the component

setLocation

public void setLocation(Point location)
Sets current location of the component.

Parameters:
location - the new location of the component

getWidth

public int getWidth()
Returns current width of the component.

Returns:
current width of the component

getHeight

public int getHeight()
Returns current height of the component.

Returns:
current height of the component

getSize

public Dimension getSize()
Returns the size of this component.

Returns:
the size of this component

setSize

public void setSize(int width,
                    int height)
Sets size of the component.

Parameters:
width - the new width of the component
height - the new height of the component

setSize

public void setSize(Dimension size)
Sets size of the component.

Parameters:
size - the size

getBounds

public Rectangle getBounds()
Returns bounds of the component.

Returns:
bounds of the component

setBounds

public void setBounds(int x,
                      int y,
                      int width,
                      int height)
Moves and resizes the component.

Parameters:
x - the new x coordinate of the component
y - the new y coordinate of the component
width - the new width of the component
height - the new height of the component

setBounds

public void setBounds(Rectangle bounds)
Moves and resizes the component.

Parameters:
bounds - the new bounds

getPreferredSize

public Dimension getPreferredSize()
Returns preferred size of the component.

Returns:
preferred size of the component

setPreferredSize

public void setPreferredSize(Dimension preferredSize)
Sets preferred size of the component.

Parameters:
preferredSize - the preferred size

setPreferredSize

public void setPreferredSize(int width,
                             int height)
Sets preferred size of the component.

Parameters:
width - the preferred width
height - the preferred height

getMaximumSize

public Dimension getMaximumSize()
Returns maximum size of the component.

Returns:
maximum size of the component

setMaximumSize

public void setMaximumSize(Dimension maximumSize)
Sets maximum size.

Parameters:
maximumSize - the maximum size

setMaximumSize

public void setMaximumSize(int width,
                           int height)
Sets maximum size.

Parameters:
width - the maximum width
height - the maximum height

getMinimumSize

public Dimension getMinimumSize()
Returns minimum size of the component.

Returns:
minimum size of the component

setMinimumSize

public void setMinimumSize(Dimension minimumSize)
Sets minimum size.

Parameters:
minimumSize - the minimum size

setMinimumSize

public void setMinimumSize(int width,
                           int height)
Sets minimum size.

Parameters:
width - the minimum width
height - the minimum height

setFixedSize

public void setFixedSize(Dimension fixedSize)
Sets fixed size.

Parameters:
fixedSize - the fixed size

setFixedSize

public void setFixedSize(int width,
                         int height)
Sets fixed size.

Parameters:
width - the fixed width
height - the fixed height

isResizable

public boolean isResizable()
Returns true if the component is resizable.

Returns:
true if the component is resizable

setResizable

public void setResizable(boolean resizable)
Sets resizable status.

Parameters:
resizable - if true the component is resizable; otherwise false

getInsets

public Insets getInsets()
Returns insets of this component.

Returns:
insets of this component

setInsets

public void setInsets(Insets insets)
Sets insets for this component.

Parameters:
insets - the insets of the component

setInsets

public void setInsets(int top,
                      int left,
                      int bottom,
                      int right)
Sets insets for this component.

Parameters:
top - the inset from the top
left - the inset from the left
bottom - the inset from the bottom
right - the inset from the right

isValid

public boolean isValid()
Returns true if component is valid.

Returns:
true if component is valid

invalidate

public void invalidate()
Invalidates the component.


validate

public void validate()
Validates the component.


revalidate

public void revalidate()
Revalidates the component.


isBackgroundSet

public boolean isBackgroundSet()
Returns true if the background color has been explicitly set.

Returns:
true if the background color has been explicitly set

getBackground

public Color getBackground()
Returns background color of the component.

Returns:
background color of the component

setBackground

public void setBackground(Color background)
Sets background color of the component.

Parameters:
background - the background color of the component

isForegroundSet

public boolean isForegroundSet()
Returns true if the background color has been explicitly set.

Returns:
true if the background color has been explicitly set

getForeground

public Color getForeground()
Returns foreground color of the component.

Returns:
foreground color of the component

setForeground

public void setForeground(Color foreground)
Sets foreground color of the component.

Parameters:
foreground - the background color of the component

isOpaque

public boolean isOpaque()
Returns true if component is opaque.

Returns:
true if component is opaque

setOpaque

public void setOpaque(boolean opaque)
Sets whether or not component paints all background.

Parameters:
opaque - true if the component should paint all background

isFontSet

public boolean isFontSet()
Returns true if the font is explicitly set.

Returns:
true if the font is explicitly set

getFont

public Font getFont()
Returns font of this component.

Returns:
font of this component

setFont

public void setFont(Font font)
Sets component's font.

Parameters:
font - the font

getFontMetrics

public FontMetrics getFontMetrics()
Returns font metrics of the component's font.

Returns:
font metrics of the component's font

getStyleSheet

public StyleSheet getStyleSheet()
Returns style sheet.

Returns:
style sheet

setStyleSheet

public void setStyleSheet(StyleSheet styleSheet)
Sets style sheet.

Parameters:
styleSheet - the style sheet

setStyleSheet

public void setStyleSheet(java.lang.String styleSheetText)
Sets style sheet.

Parameters:
styleSheetText - the style sheet text

removeStyleSheet

public void removeStyleSheet()
Removes style sheet.


isCursorSet

public boolean isCursorSet()
Returns true if the cursor is explicitly set.

Returns:
true if the cursor is explicitly set

getCursor

public Cursor getCursor()
Returns cursor.

Returns:
cursor

setCursor

public void setCursor(Cursor cursor)
Sets cursor.

Parameters:
cursor - the cursor

isPainting

public boolean isPainting()
Returns true if component is painting itself.

Returns:
true if component is painting itself

repaint

public void repaint()
Repaints the component.


repaint

public void repaint(int x,
                    int y,
                    int width,
                    int height)
Repaints the component region.

Parameters:
x - the x coordinate of the region
y - the y coordinate of the region
width - the width of the region
height - the height of the region

repaint

public void repaint(Rectangle region)
Repaints the component region.

Parameters:
region - the component region

isUpdatesEnabled

public boolean isUpdatesEnabled()
Returns true if updates are enabled.

Returns:
true if updates are enabled

setUpdatesEnabled

public void setUpdatesEnabled(boolean enabled)
Enables/disables updates.

Parameters:
enabled - it true updates are enabled

update

public void update()
Updates the component.


update

public void update(int x,
                   int y,
                   int width,
                   int height)
Updates the component region.

Parameters:
x - the x coordinate of the region
y - the y coordinate of the region
width - the width of the region
height - the height of the region

update

public void update(Rectangle region)
Updates the component region.

Parameters:
region - the component region

isLocaleSet

public boolean isLocaleSet()
Returns true if locale is explicitly set.

Returns:
true if locale is explicitly set

getLocale

public java.util.Locale getLocale()
Returns the locale of the component.

Returns:
the locale of the component

setLocale

public void setLocale(java.util.Locale locale)
Sets the locale of the component.

Parameters:
locale - the locale of the component

getComponentOrientation

public ComponentOrientation getComponentOrientation()
Returns component orientation.

Returns:
component orientation

isLeftToRight

public boolean isLeftToRight()
Returns true if orientation is left-to-right.

Returns:
true if orientation is left-to-right

setComponentOrientation

public void setComponentOrientation(ComponentOrientation orientation)
Sets component orientation.

Parameters:
orientation - the component orientation
Throws:
java.lang.IllegalArgumentException - if component orientation is null

setLeftToRightComponentOrientation

public void setLeftToRightComponentOrientation()
Sets left-to-right component orientation.


setRightToLeftComponentOrientation

public void setRightToLeftComponentOrientation()
Sets right-to-left component orientation.


unsetComponentOrientation

public void unsetComponentOrientation()
Unsets component orientation.


updateComponentOrientation

public void updateComponentOrientation()
Updates components orientation using current locale.


isResourceBundleNameSet

public boolean isResourceBundleNameSet()
Returns true if resource bundle name is explicitly set.

Returns:
true if resource bundle name is explicitly set

getResourceBundleName

public java.lang.String getResourceBundleName()
Returns resource bundle name.

Returns:
resource bundle name

setResourceBundleName

public void setResourceBundleName(java.lang.String resourceBundleName)
Sets resource bundle name.

Parameters:
resourceBundleName - new resource bundle name

setDefaultResourceBundleName

public void setDefaultResourceBundleName()
Sets default resource bundle name.


localizeString

public java.lang.String localizeString(java.lang.String key,
                                       java.lang.String str)
Localizes specified string.

Parameters:
key - the resource bundle key
str - the string to be localized
Returns:
localized string

localizeString

public java.lang.String localizeString(java.lang.String s)
Returns localized string.

Parameters:
s - the string to be localized
Returns:
localized string

localizeObject

public java.lang.Object localizeObject(java.lang.String key,
                                       java.lang.Object obj)
Localizes specified object.

Parameters:
key - the resource bundle key
obj - the object to be localized
Returns:
localized object

localizeStrings

public java.lang.String[] localizeStrings(java.lang.String key,
                                          java.lang.String[] strings)
Localizes specified string array.

Parameters:
key - the resource bundle key
strings - the string array to be localized
Returns:
localized string array

updateLocalization

public void updateLocalization()
Updates localization.


getToolTipText

public java.lang.String getToolTipText()
Returns tooltip text.

Returns:
tooltip text

setToolTipText

public void setToolTipText(java.lang.String text)
Sets tooltip text.

Parameters:
text - the tooltip text

getToolTipText

public java.lang.String getToolTipText(int x,
                                       int y)
Returns tooltip text for the specified location. Null is returned if there is no tooltip for the location.

Parameters:
x - the x coordinate of the tooltip location
y - int y coordinate of the tooltip location
Returns:
tooltip text for the specified location

getStatusTipText

public java.lang.String getStatusTipText()
Returns status tip text.

Returns:
status tip text

setStatusTipText

public void setStatusTipText(java.lang.String text)
Sets status tip text.

Parameters:
text - the status tip text

getWhatsThisText

public java.lang.String getWhatsThisText()
Returns What's This text.

Returns:
What's This text

setWhatsThisText

public void setWhatsThisText(java.lang.String text)
Sets What's This text.

Parameters:
text - the What's This text

addComponentListener

public void addComponentListener(ComponentListener listener)
Adds component listener.

Parameters:
listener - the component listener

removeComponentListener

public void removeComponentListener(ComponentListener listener)
Removes component listener.

Parameters:
listener - the component listener

getComponentListeners

public ComponentListener[] getComponentListeners()
Returns component listeners.

Returns:
component listeners

addFocusListener

public void addFocusListener(FocusListener listener)
Adds focus listener.

Parameters:
listener - the focus listener

removeFocusListener

public void removeFocusListener(FocusListener listener)
Removes focus listener.

Parameters:
listener - the focus listener

getFocusListener

public FocusListener[] getFocusListener()
Returns focus listeners.

Returns:
focus listeners

addKeyListener

public void addKeyListener(KeyListener listener)
Adds key listener.

Parameters:
listener - the key listener

removeKeyListener

public void removeKeyListener(KeyListener listener)
Removes key listener.

Parameters:
listener - the mouse listener

getKeyListeners

public KeyListener[] getKeyListeners()
Returns key listeners.

Returns:
key listeners

addMouseListener

public void addMouseListener(MouseListener listener)
Adds mouse listener.

Parameters:
listener - the mouse listener

removeMouseListener

public void removeMouseListener(MouseListener listener)
Removes mouse listener.

Parameters:
listener - the mouse listener

getMouseListeners

public MouseListener[] getMouseListeners()
Returns mouse listeners.

Returns:
mouse listeners

addMouseMotionListener

public void addMouseMotionListener(MouseMotionListener listener)
Adds mouse motion listener.

Parameters:
listener - the mouse motion listener

removeMouseMotionListener

public void removeMouseMotionListener(MouseMotionListener listener)
Removes mouse motion listener.

Parameters:
listener - the mouse motion listener

getMouseMotionListeners

public MouseMotionListener[] getMouseMotionListeners()
Returns mouse motion listeners.

Returns:
mouse motion listeners

addMouseWheelListener

public void addMouseWheelListener(MouseWheelListener listener)
Adds mouse wheel listener.

Parameters:
listener - the mouse wheel listener

removeMouseWheelListener

public void removeMouseWheelListener(MouseWheelListener listener)
Removes mouse wheel listener.

Parameters:
listener - the mouse wheel listener

getMouseWheelListeners

public MouseWheelListener[] getMouseWheelListeners()
Returns mouse wheel listeners.

Returns:
mouse wheel listeners

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds property chage listener for all properties.

Parameters:
listener - the property chage listener

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Adds property chage listener for specified property.

Parameters:
propertyName - the property name
listener - the property chage listener

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes property chage listener for all properties.

Parameters:
listener - the property chage listener

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Removes property chage listener for specified property.

Parameters:
propertyName - the property name
listener - the property chage listener

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners()
Returns property change listeners for all properties.

Returns:
property change listeners for all properties

getPropertyChangeListeners

public java.beans.PropertyChangeListener[] getPropertyChangeListeners(java.lang.String propertyName)
Returns property chage listeners for specified property.

Parameters:
propertyName - the property name
Returns:
property chage listeners for specified property

getClientProperty

public java.lang.Object getClientProperty(java.lang.Object key)
Returns the value of the property specified by the key.

Parameters:
key - the being queried
Returns:
the value of this property or null if there is no such property

putClientProperty

public void putClientProperty(java.lang.Object key,
                              java.lang.Object value)
Puts key/value "client property".

Parameters:
key - the new property key
value - the new property value
Throws:
java.lang.IllegalArgumentException - if the key is null

getEventMask

protected long getEventMask()
Returns event mask.

Returns:
event mask

enableEvents

protected void enableEvents(long eventsToEnable)
Enables the events specified by event mask parameter to be delivered to this component.

Parameters:
eventsToEnable - the events to be enabled

disableEvents

protected void disableEvents(long eventsToDisable)
Disables the events specified by event mask parameter from being delivered to this component.

Parameters:
eventsToDisable - the events to be disabled

eventEnabled

protected boolean eventEnabled(long event)
Returns true if the specified event is enabled.

Parameters:
event - the event
Returns:
true if the specified event is enabled

processComponentEvent

protected void processComponentEvent(ComponentEvent event)
Process component event.

Parameters:
event - the key event

processStyleChange

protected void processStyleChange()
Process style change.


processFocusEvent

protected void processFocusEvent(FocusEvent event)
Process focus event.

Parameters:
event - the focus event

processKeyEvent

protected void processKeyEvent(KeyEvent event)
Process key event.

Parameters:
event - the key event

processMouseEvent

protected void processMouseEvent(MouseEvent event)
Process mouse event.

Parameters:
event - the mouse event

processContextMenuEvent

protected void processContextMenuEvent(ContextMenuEvent event)
Process context menu event.

Parameters:
event - the context menu event

processMouseMotionEvent

protected void processMouseMotionEvent(MouseEvent event)
Process mouse motion event.

Parameters:
event - the mouse motion event

processMouseWheelEvent

protected void processMouseWheelEvent(MouseWheelEvent event)
Process mouse wheel event.

Parameters:
event - the mouse wheel event

paintComponent

protected void paintComponent(Graphics g)
Paints the component.

Parameters:
g - the graphics object
Throws:
java.lang.IllegalStateException - if method is called outside paint event handling

disposeComponent

protected void disposeComponent()
Disposes the component.


firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  java.lang.Object oldValue,
                                  java.lang.Object newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property
newValue - the new value of the property

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  boolean oldValue,
                                  boolean newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a boolean)
newValue - the new value of the property (as a boolean)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  byte oldValue,
                                  byte newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a byte)
newValue - the new value of the property (as a byte)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  char oldValue,
                                  char newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a char)
newValue - the new value of the property (as a char)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  short oldValue,
                                  short newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a short)
newValue - the new value of the property (as a short)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  int oldValue,
                                  int newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a int)
newValue - the new value of the property (as a int)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  long oldValue,
                                  long newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a long)
newValue - the new value of the property (as a long)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  float oldValue,
                                  float newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a float)
newValue - the new value of the property (as a float)

firePropertyChange

protected void firePropertyChange(java.lang.String propertyName,
                                  double oldValue,
                                  double newValue)
Fires a bound property change.

Parameters:
propertyName - the property name
oldValue - the old value of the property (as a double)
newValue - the new value of the property (as a double)

paramString

protected java.lang.String paramString()
Returns parameters string.

Returns:
parameters string

toString

public java.lang.String toString()


disposeObject

protected final void disposeObject()
Disposes the object.

Specified by:
disposeObject in class AbstractDisposable


Copyright © 2007 ETF and contributors. All Rights Reserved.