com.sibvisions.rad.ui.qt.impl
Class QtComponentBase<C extends QObject>

java.lang.Object
  extended by com.sibvisions.rad.ui.qt.impl.QtResource<C>
      extended by com.sibvisions.rad.ui.qt.impl.QtComponentBase<C>
Type Parameters:
C - the component type
All Implemented Interfaces:
IComponent, IResource
Direct Known Subclasses:
QtComponent, QtMenuItem

public abstract class QtComponentBase<C extends QObject>
extends QtResource<C>
implements IComponent

The ComponentEventFilter handles the events from the resource and sends important events to the listeners.


Field Summary
protected  IFactory factory
          The factory that created this component.
 
Fields inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
resource
 
Constructor Summary
protected QtComponentBase(C pResource)
          Creates an encapsulated instance of QtResource with the specified type R.
 
Method Summary
 KeyHandler eventKeyPressed()
          The EventHandler for the key pressed event.
 KeyHandler eventKeyReleased()
          The EventHandler for the key released event.
 KeyHandler eventKeyTyped()
          The EventHandler for the key typed event.
 MouseHandler eventMouseClicked()
          The EventHandler for the mouse clicked event.
 MouseHandler eventMouseEntered()
          The EventHandler for the mouse entered event.
 MouseHandler eventMouseExited()
          The EventHandler for the mouse exited event.
 MouseHandler eventMousePressed()
          The EventHandler for the mouse pressed event.
 MouseHandler eventMouseReleased()
          The EventHandler for the mouse released event.
 IFactory getFactory()
          Gets the factory that created this NamedObject.
 boolean isVisible()
          Determines whether this component should be visible when its parent is visible.
 void setFactory(IFactory pFactory)
          Sets the components factory implementation.
protected abstract  void setResourceVisible(boolean pVisible)
          Sets the visibility of the internal resource.
 void setVisible(boolean pVisible)
          Shows or hides this component depending on the value of parameter b.
 
Methods inherited from class com.sibvisions.rad.ui.qt.impl.QtResource
equals, getResource, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.rad.ui.IComponent
capture, getBackground, getBounds, getCursor, getFont, getForeground, getLocation, getMaximumSize, getMinimumSize, getName, getParent, getPreferredSize, getSize, getToolTipText, isBackgroundSet, isCursorSet, isEnabled, isFocusable, isFontSet, isForegroundSet, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, requestFocus, setBackground, setBounds, setCursor, setEnabled, setFocusable, setFont, setForeground, setLocation, setMaximumSize, setMinimumSize, setName, setParent, setPreferredSize, setSize, setToolTipText
 
Methods inherited from interface javax.rad.ui.IResource
getResource
 

Field Detail

factory

protected IFactory factory
The factory that created this component.

Constructor Detail

QtComponentBase

protected QtComponentBase(C pResource)
Creates an encapsulated instance of QtResource with the specified type R.

Parameters:
pResource - base resource
Method Detail

getFactory

public IFactory getFactory()
Gets the factory that created this NamedObject.

Specified by:
getFactory in interface IComponent
Returns:
the factory that created this NamedObject

isVisible

public boolean isVisible()
Determines whether this component should be visible when its parent is visible. Components are initially visible, with the exception of top level components such as Frame objects.

Specified by:
isVisible in interface IComponent
Returns:
true if the component is visible, false otherwise
See Also:
IComponent.setVisible(boolean)

setVisible

public void setVisible(boolean pVisible)
Shows or hides this component depending on the value of parameter b.

Specified by:
setVisible in interface IComponent
Parameters:
pVisible - if true, shows this component; otherwise, hides this component
See Also:
IComponent.isVisible()

eventMousePressed

public MouseHandler eventMousePressed()
The EventHandler for the mouse pressed event.

Specified by:
eventMousePressed in interface IComponent
Returns:
the EventHandler for the mouse pressed event.

eventMouseReleased

public MouseHandler eventMouseReleased()
The EventHandler for the mouse released event.

Specified by:
eventMouseReleased in interface IComponent
Returns:
the EventHandler for the mouse released event.

eventMouseClicked

public MouseHandler eventMouseClicked()
The EventHandler for the mouse clicked event.

Specified by:
eventMouseClicked in interface IComponent
Returns:
the EventHandler for the mouse clicked event.

eventMouseEntered

public MouseHandler eventMouseEntered()
The EventHandler for the mouse entered event.

Specified by:
eventMouseEntered in interface IComponent
Returns:
the EventHandler for the mouse entered event.

eventMouseExited

public MouseHandler eventMouseExited()
The EventHandler for the mouse exited event.

Specified by:
eventMouseExited in interface IComponent
Returns:
the EventHandler for the mouse exited event.

eventKeyPressed

public KeyHandler eventKeyPressed()
The EventHandler for the key pressed event.

Specified by:
eventKeyPressed in interface IComponent
Returns:
the EventHandler for the key pressed event.

eventKeyReleased

public KeyHandler eventKeyReleased()
The EventHandler for the key released event.

Specified by:
eventKeyReleased in interface IComponent
Returns:
the EventHandler for the key released event.

eventKeyTyped

public KeyHandler eventKeyTyped()
The EventHandler for the key typed event.

Specified by:
eventKeyTyped in interface IComponent
Returns:
the EventHandler for the key typed event.

setResourceVisible

protected abstract void setResourceVisible(boolean pVisible)
Sets the visibility of the internal resource.

Parameters:
pVisible - true to set visible, otherwise false

setFactory

public void setFactory(IFactory pFactory)
Sets the components factory implementation.

Parameters:
pFactory - the IFactory
See Also:
QtFactory


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.