Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 



org.eclipse.jst.pagedesigner.converter
Class HiddenTagConverter

java.lang.Object
  extended by 
org.eclipse.jst.pagedesigner.converter.HiddenTagConverter
All Implemented Interfaces:
ITagConverter

public class HiddenTagConverter
extends java.lang.Object
implements ITagConverter

This is for those tags that don't convert to HTML. So they will not display anything in preview, and will display a small icon in designer.

Version:
1.5

Constructor Summary
HiddenTagConverter (org.w3c.dom.Element host, ILabelProvider labelProvider)
           
 
Method Summary
 void convertRefresh (java.lang.Object context)
          refresh the internal state of this ITagConverter.
 void dispose ()
          API contract needed here
 java.util.List getChildModeList ()
           
  ConvertPosition getChildVisualPosition (org.w3c.dom.Node childModel)
          For child nodes that need further convert, return their position in the converted DOM tree.
 org.w3c.dom.Element getHostElement ()
           
 int getMode ()
           
 java.util.List getNonVisualChildren ()
           
 org.w3c.dom.Element getResultElement ()
           
 Image getVisualImage ()
          if isVisualByHTML() return false, then this method should return an image to be displayed in designer.
 boolean isMultiLevel ()
          When the convert result in multi-level element.
 boolean isVisualByHTML ()
          for some tags, they don't convert to HTML.
 boolean isWidget ()
           
 void setDestDocument (IDOMDocument document)
          Set the target document where the converted node should belong to.
 void setMode (int mode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HiddenTagConverter

public HiddenTagConverter(org.w3c.dom.Element host,
                          ILabelProvider labelProvider)
Parameters:
host -
labelProvider -
Method Detail

setDestDocument

public void setDestDocument(IDOMDocument document)
Description copied from interface: ITagConverter
Set the target document where the converted node should belong to.

Specified by:
setDestDocument in interface ITagConverter

convertRefresh

public void convertRefresh(java.lang.Object context)
Description copied from interface: ITagConverter
refresh the internal state of this ITagConverter. This method normally is called when the host element change.

Specified by:
convertRefresh in interface ITagConverter

getHostElement

public org.w3c.dom.Element getHostElement()
Specified by:
getHostElement in interface ITagConverter
Returns:
The host element being converted.

isVisualByHTML

public boolean isVisualByHTML()
Description copied from interface: ITagConverter
for some tags, they don't convert to HTML. In that case, this method should return false for them. And if this method return false, then should return an image in getVisualImage() for displaying in the designer.

Specified by:
isVisualByHTML in interface ITagConverter
Returns:
true if the tag represents something that will be rendered visually at runtime

getVisualImage

public Image getVisualImage()
Description copied from interface: ITagConverter
if isVisualByHTML() return false, then this method should return an image to be displayed in designer. Normally this image will be a shared image for those hidden elements. It is this class's responsibility to dispose the image if the image is not a shared one.

Specified by:
getVisualImage in interface ITagConverter
Returns:
the placeholder image for non-visual tags

getResultElement

public org.w3c.dom.Element getResultElement()
Specified by:
getResultElement in interface ITagConverter
Returns:
the result element after conversion

getChildModeList

public java.util.List getChildModeList()
Specified by:
getChildModeList in interface ITagConverter
Returns:
the list of children that should be continuely converted.

getChildVisualPosition

public 
ConvertPosition getChildVisualPosition(org.w3c.dom.Node childModel)
Description copied from interface: ITagConverter
For child nodes that need further convert, return their position in the converted DOM tree.

Specified by:
getChildVisualPosition in interface ITagConverter
Returns:
the position of child nodes

isMultiLevel

public boolean isMultiLevel()
Description copied from interface: ITagConverter
When the convert result in multi-level element. If this method return false, then the caller should not use child nodes of getHostElement()

Specified by:
isMultiLevel in interface ITagConverter
Returns:
true if the host element has convertable children

isWidget

public boolean isWidget()
Specified by:
isWidget in interface ITagConverter
Returns:
true if the host element is a widget

dispose

public void dispose()
Description copied from interface: ITagConverter
API contract needed here

Specified by:
dispose in interface ITagConverter

setMode

public void setMode(int mode)
Specified by:
setMode in interface ITagConverter

getMode

public int getMode()
Returns:
the mode

getNonVisualChildren

public java.util.List getNonVisualChildren()
Specified by:
getNonVisualChildren in interface ITagConverter
Returns:
a list of Element tags that map to non-visual children Type should be always be Element.



 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire