sferyx.administration.renderers.adapters
Class CustomTagAdapter

java.lang.Object
  extended by sferyx.administration.renderers.adapters.GenericTagAdapter
      extended by sferyx.administration.renderers.adapters.CustomTagAdapter
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.MouseListener, java.util.EventListener

public class CustomTagAdapter
extends GenericTagAdapter
implements java.awt.event.ActionListener, java.awt.event.MouseListener

This is the adapter attached to each custom tag. It handles all actions and also provides the write methods for generating the final output from the tag


Field Summary
 
Fields inherited from class sferyx.administration.renderers.adapters.GenericTagAdapter
visualRepresentationComponent
 
Constructor Summary
CustomTagAdapter()
          Creates a new instance of CustomTagAdapter
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent actionEvent)
          This method is supposed to be ovveridden in order to provide custom handling of actions over the component
 java.lang.String getCustomTagString()
          This method returns the plain tag string extracted from the document when the page is loaded
 java.lang.String getGeneratedOutput()
          This method is supposed to generate the final output when the page is saved
 java.awt.Component getVisualRepresentationComponent()
          Returns the component used as visual representation inside the editor.
 boolean isReadOnly()
          Indicates whether the component is contained within a readonly section or not
 void mouseClicked(java.awt.event.MouseEvent mouseEvent)
          This method is supposed to be ovveridden in order to provide custom handling of events over the component
 void mouseEntered(java.awt.event.MouseEvent mouseEvent)
          This method is supposed to be ovveridden in order to provide custom handling of events over the component
 void mouseExited(java.awt.event.MouseEvent mouseEvent)
          This method is supposed to be ovveridden in order to provide custom handling of events over the component
 void mousePressed(java.awt.event.MouseEvent mouseEvent)
          This method is supposed to be ovveridden in order to provide custom handling of events over the component
 void mouseReleased(java.awt.event.MouseEvent mouseEvent)
          This method is supposed to be ovveridden in order to provide custom handling of events over the component
 void setCustomTagString(java.lang.String tagString)
          This method sets the plain tag string extracted from the document when the page is loaded
 void setHTMLEditor(HTMLBrowser htmlEditor)
           
 void setReusedVisualRepresentationComponent(java.awt.Component visualRepresentationComponent)
           
 void setVisualRepresentationComponent(java.awt.Component visualRepresentationComponent)
          This method is called automatically when the document is parsed and custom tags are found.
 
Methods inherited from class sferyx.administration.renderers.adapters.GenericTagAdapter
getElement, setElement, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CustomTagAdapter

public CustomTagAdapter()
Creates a new instance of CustomTagAdapter

Method Detail

setCustomTagString

public void setCustomTagString(java.lang.String tagString)
This method sets the plain tag string extracted from the document when the page is loaded

Overrides:
setCustomTagString in class GenericTagAdapter

getCustomTagString

public java.lang.String getCustomTagString()
This method returns the plain tag string extracted from the document when the page is loaded

Overrides:
getCustomTagString in class GenericTagAdapter

getGeneratedOutput

public java.lang.String getGeneratedOutput()
This method is supposed to generate the final output when the page is saved

Overrides:
getGeneratedOutput in class GenericTagAdapter

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent actionEvent)
This method is supposed to be ovveridden in order to provide custom handling of actions over the component

Specified by:
actionPerformed in interface java.awt.event.ActionListener

getVisualRepresentationComponent

public java.awt.Component getVisualRepresentationComponent()
Returns the component used as visual representation inside the editor. In this case it is a JButton


setReusedVisualRepresentationComponent

public void setReusedVisualRepresentationComponent(java.awt.Component visualRepresentationComponent)
Overrides:
setReusedVisualRepresentationComponent in class GenericTagAdapter

setVisualRepresentationComponent

public void setVisualRepresentationComponent(java.awt.Component visualRepresentationComponent)
This method is called automatically when the document is parsed and custom tags are found. This can be ovverriden in order to provide personalized implementations with the newly created compoent. Should always call super.setVisualRepresentationComponent(Component)

Overrides:
setVisualRepresentationComponent in class GenericTagAdapter

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent mouseEvent)
This method is supposed to be ovveridden in order to provide custom handling of events over the component

Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent mouseEvent)
This method is supposed to be ovveridden in order to provide custom handling of events over the component

Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent mouseEvent)
This method is supposed to be ovveridden in order to provide custom handling of events over the component

Specified by:
mouseExited in interface java.awt.event.MouseListener

mousePressed

public void mousePressed(java.awt.event.MouseEvent mouseEvent)
This method is supposed to be ovveridden in order to provide custom handling of events over the component

Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent mouseEvent)
This method is supposed to be ovveridden in order to provide custom handling of events over the component

Specified by:
mouseReleased in interface java.awt.event.MouseListener

isReadOnly

public boolean isReadOnly()
Description copied from class: GenericTagAdapter
Indicates whether the component is contained within a readonly section or not

Overrides:
isReadOnly in class GenericTagAdapter

setHTMLEditor

public void setHTMLEditor(HTMLBrowser htmlEditor)