fi.hut.tml.xsmiles.mlfc.xmlcss
Class XMLCSSMLFC

java.lang.Object
  extended byfi.hut.tml.xsmiles.mlfc.MLFC
      extended byfi.hut.tml.xsmiles.mlfc.xmlcss.XMLCSSMLFC
All Implemented Interfaces:
PopupHandler, RefreshableService, ResourceFetcher
Direct Known Subclasses:
XHTML2MLFC

public class XMLCSSMLFC
extends MLFC
implements RefreshableService, PopupHandler

Author:
Mikko Pohja / Mikko Honkala

Field Summary
protected  boolean defaultStylesheetAdded
          Initialize the MLFC.
static short DOC_HTML_OR_XHTML
           
static short DOC_UNKNOWN
           
static short DOC_XML
           
protected  short documentType
           
protected  boolean refreshBlocking
           
protected  CSSRenderer renderer
           
protected  java.awt.Container scrollPane
           
protected  boolean started
           
 java.util.Vector windows
           
static java.lang.String XHTML_NS
           
static java.lang.String XHTML2_NS
           
 
Fields inherited from class fi.hut.tml.xsmiles.mlfc.MLFC
contentHandler, controlsShown, title
 
Constructor Summary
XMLCSSMLFC()
           
 
Method Summary
 void addRenderer()
          create or re-create renderer.
 void addXHTMLStyleSheets()
          finds html/head/style elements and adds them to the CSS engine does not care about namespaces, so should work with XHTML1 & 2
 void closePopup(StylableElement elem)
           
 void commitUpdateTransaction()
          Informs the container that it is free to repaint itself, and should do it right now.
 org.w3c.dom.Element createElementNS(org.apache.xerces.dom.DocumentImpl doc, java.lang.String URI, java.lang.String tag)
          Creates xhtml elements to XSimles document.
protected  CSSRenderer createRenderer()
           
static org.w3c.dom.Element findChildElement(java.lang.String name, org.w3c.dom.Element parent)
          Set the title for the presentation.
 void init()
          Initialize the MLFC.
 void refresh()
          Refresh this element
 void repaintExternalWindows()
           
 void rollbackUpdateTransaction()
          Informs the container that it is free to repaint itself, but it shouldn't do it now.
 void setBlocking(boolean state)
           
 void setScrollBar(java.lang.String id)
           
 void setZoom(double zoom)
          notify that the zoom level has changed.
 void showAsPopup(StylableElement elem, java.lang.String containerType)
           
 void start()
          Start the MLFC.
 void startUpdateTransaction()
          Informs the container that there is going to be a lot of concurrent updates to the document and the container shouldn't repaint itself until commit is called.
 void stop()
          Stop the MLFC.
 
Methods inherited from class fi.hut.tml.xsmiles.mlfc.MLFC
createAttributeNS, get, getContainer, getContentHandler, getLocalname, getMLFCController, getMLFCListener, getMLFCParameters, getResourceReferencer, getTitle, getVersion, getXMLDocument, initMLFC, isHost, isPrimary, pause, setContainer, setContentHandler, setHost, setMLFCListener, setMLFCParameters, setTitle, setXMLDocument, startMLFC, stopMLFC
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

renderer

protected CSSRenderer renderer

scrollPane

protected java.awt.Container scrollPane

XHTML_NS

public static final java.lang.String XHTML_NS
See Also:
Constant Field Values

XHTML2_NS

public static final java.lang.String XHTML2_NS
See Also:
Constant Field Values

DOC_HTML_OR_XHTML

public static final short DOC_HTML_OR_XHTML
See Also:
Constant Field Values

DOC_XML

public static final short DOC_XML
See Also:
Constant Field Values

DOC_UNKNOWN

public static final short DOC_UNKNOWN
See Also:
Constant Field Values

documentType

protected short documentType

windows

public java.util.Vector windows

defaultStylesheetAdded

protected boolean defaultStylesheetAdded
Initialize the MLFC. This function is called just before the elements are initialized. There is no pair to this method.


started

protected boolean started

refreshBlocking

protected boolean refreshBlocking
Constructor Detail

XMLCSSMLFC

public XMLCSSMLFC()
Method Detail

init

public void init()
Description copied from class: MLFC
Initialize the MLFC. This function is called just before the elements are initialized. There is no pair to this method.

Overrides:
init in class MLFC

addRenderer

public void addRenderer()
create or re-create renderer. NOTE: creates also the scollpane


createRenderer

protected CSSRenderer createRenderer()

commitUpdateTransaction

public void commitUpdateTransaction()
Description copied from class: MLFC
Informs the container that it is free to repaint itself, and should do it right now. By default this method does nothing, subclasses should implement it when needed.

Overrides:
commitUpdateTransaction in class MLFC

rollbackUpdateTransaction

public void rollbackUpdateTransaction()
Description copied from class: MLFC
Informs the container that it is free to repaint itself, but it shouldn't do it now. By default this method does nothing, subclasses should implement it when needed.

Overrides:
rollbackUpdateTransaction in class MLFC

startUpdateTransaction

public void startUpdateTransaction()
Description copied from class: MLFC
Informs the container that there is going to be a lot of concurrent updates to the document and the container shouldn't repaint itself until commit is called. By default this method does nothing, subclasses should implement it when needed.

Overrides:
startUpdateTransaction in class MLFC

setZoom

public void setZoom(double zoom)
notify that the zoom level has changed. Note that some content may choose to not implement zooming.

Overrides:
setZoom in class MLFC

start

public void start()
Start the MLFC. This function is the pair to stop().

Specified by:
start in class MLFC

stop

public void stop()
Stop the MLFC. This function is the pair to start().

Specified by:
stop in class MLFC

repaintExternalWindows

public void repaintExternalWindows()

createElementNS

public org.w3c.dom.Element createElementNS(org.apache.xerces.dom.DocumentImpl doc,
                                           java.lang.String URI,
                                           java.lang.String tag)
                                    throws org.w3c.dom.DOMException
Creates xhtml elements to XSimles document.

Overrides:
createElementNS in class MLFC
Throws:
org.w3c.dom.DOMException

addXHTMLStyleSheets

public void addXHTMLStyleSheets()
finds html/head/style elements and adds them to the CSS engine does not care about namespaces, so should work with XHTML1 & 2


findChildElement

public static org.w3c.dom.Element findChildElement(java.lang.String name,
                                                   org.w3c.dom.Element parent)
Set the title for the presentation.


refresh

public void refresh()
Description copied from interface: RefreshableService
Refresh this element

Specified by:
refresh in interface RefreshableService

setBlocking

public void setBlocking(boolean state)
Specified by:
setBlocking in interface RefreshableService

setScrollBar

public void setScrollBar(java.lang.String id)

showAsPopup

public void showAsPopup(StylableElement elem,
                        java.lang.String containerType)
Specified by:
showAsPopup in interface PopupHandler

closePopup

public void closePopup(StylableElement elem)
Specified by:
closePopup in interface PopupHandler


X-Smiles 1.2