MetaDone
metadone.client.grasyla2.swing.JTextEngine< T extends JComponent > Class Reference
Inheritance diagram for metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >:
Collaboration diagram for metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >:

List of all members.

Public Member Functions

 JTextEngine (Class< T > supportedType, GrasylaContext context, ConcreteObject expression, Engine parent) throws BadPreCondition

Protected Member Functions

final Component<?extends T > evaluateComponent (BootstrapGrasyla grasyla) throws BadPreCondition
abstract JTextComponent getTextComponent ()
abstract Component<?extends T > evaluateComponentCreate (BootstrapGrasyla grasyla) throws BadPreCondition
void disposeInternal ()
String buildContents () throws BadPreCondition
String composeText ()
void notifyChildChanged (Engine child, ChildComponent comp)
boolean canActivateChild (GrasylaEngine ch)

Package Functions

void setText (String text)
void validateContents (Object source)

Private Attributes

boolean focused

Detailed Description

Creates a text editor.

This is the base class for various text editors. Some events such as focus or changes are handled directly by this class. The editor can be retrieved using getTextComponent() which may differ from the component returned by this engine.

Attributes

Contents

Evaluated as String to set the contents of the editor.

Result

Specified by the sub-class, but it is a text editor.

Actions
"editing", "validate", "click", "doubleClick" and ContextMenuEvent.
Author:
kma

Constructor & Destructor Documentation

metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.JTextEngine ( Class< T >  supportedType,
GrasylaContext  context,
ConcreteObject  expression,
Engine  parent 
) throws BadPreCondition

Initializes this engine.

Parameters:
supportedTypeThe type of the component
contextThe context
expressionThe expression
parentThe parent or null
Exceptions:
BadPreCondition

References metadone.client.grasyla2.swing.GrasylaSwingHelper.registerAttributeHandlers().


Member Function Documentation

String metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.buildContents ( ) throws BadPreCondition [protected]

Rebuilds the contents from the children expressions.

Returns:
The text
Exceptions:
BadPreCondition
boolean metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.canActivateChild ( GrasylaEngine  ch) [protected]
String metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.composeText ( ) [protected]

Composes the text for the component from the children expressions.

The children and not rebuilt.

Returns:
The text
void metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.disposeInternal ( ) [protected]
final Component<? extends T> metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.evaluateComponent ( BootstrapGrasyla  grasyla) throws BadPreCondition [protected]
abstract Component<? extends T> metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.evaluateComponentCreate ( BootstrapGrasyla  grasyla) throws BadPreCondition [protected, pure virtual]

Evaluates the component to create the text component.

After a call to this method, the getTextComponent() should return the text component used by the engine.

Parameters:
grasylaThe grasyla
Returns:
The result for the evalutation
Exceptions:
BadPreCondition
See also:
evaluateComponent(BootstrapGrasyla)
getTextComponent()
abstract JTextComponent metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.getTextComponent ( ) [protected, pure virtual]

Returns the text component used by this engine.

Returns:
The text component
See also:
evaluateComponentCreate(BootstrapGrasyla)
void metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.notifyChildChanged ( Engine  child,
ChildComponent  comp 
) [protected]
void metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.setText ( String  text) [package]

Sets the text in this text component.

Parameters:
textThe new text
void metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.validateContents ( Object  source) [package]

Validates the contents.

Produces a UserValueChangeEvent and then rebuilds the contents of this engine.

Parameters:
sourceThe new contents

Member Data Documentation

boolean metadone.client.grasyla2.swing.JTextEngine< T extends JComponent >.focused [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations