JFCML - JFC/Swing
XML Markup Language

com.metasolutions.jfcml.helpers
Class WindowContext

java.lang.Object
  extended by com.metasolutions.jfcml.helpers.WindowContext
All Implemented Interfaces:
Serializable

public class WindowContext
extends Object
implements Serializable

A collection of data structures needed for parsing a JFCMLWindow. This data was originally contained within the TagHandler, but has been decoupled. This data is used throughout the parser and interpreter.

Version:
0.9
Author:
Shawn Curry
See Also:
Serialized Form

Field Summary
protected  SimpleStack childElements
           
protected  Element currentElement
           
protected  String currentFileName
           
protected  String defaultScriptingLanguage
           
protected  SimpleStack elements
           
protected  SimpleHashMap includes
           
protected  PackageList packageList
           
protected  SimpleStack rootPanes
           
protected  SimpleStack scopeStack
           
protected  SimpleHashMap variables
           
protected  Container window
           
 
Constructor Summary
WindowContext()
           
 
Method Summary
 void addVariable(Object symbol, Object variable)
           
 Applet getApplet()
           
 SimpleStack getChildElements()
           
 Container getContentPane()
           
 Element getCurrentElement()
           
 String getCurrentFileName()
          Returns the current file name.
 JRootPane getCurrentRootPane()
           
 String getDefaultScriptingLanguage()
          Returns the default Scripting Language.
 Dialog getDialog()
           
 SimpleStack getElements()
           
 Frame getFrame()
           
 Component getGlassPane()
           
 JApplet getJApplet()
           
 JDialog getJDialog()
           
 JFrame getJFrame()
           
 JMenuBar getJMenuBar()
           
 JRootPane getJRootPane()
           
 JWindow getJWindow()
           
 JLayeredPane getLayeredPane()
           
 PackageList getPackageList()
           
 SimpleStack getRootPanes()
           
 Container getTarget()
           
 Class getType()
           
 Object getVariable(String varname)
           
 SimpleHashMap getVariables()
           
 Window getWindow()
           
 void includeFile(String fileid)
           
 boolean isFileIncluded(String fileid)
           
 JRootPane popRootPane()
           
 void popStackFrame()
           
 void pushRootPane()
           
 void pushStackFrame()
           
 void setChildElements(SimpleStack childElements)
           
 void setCurrentElement(Element currentElement)
           
 void setCurrentFileName(String currentFileName)
          Sets the current file name.
 void setDefaultScriptingLanguage(String defaultScriptingLanguage)
          Sets the default Scripting Language.
 void setElements(SimpleStack elements)
           
 void setPackageList(PackageList packageList)
           
 void setRootPanes(SimpleStack rootPanes)
           
 void setTarget(Container target)
           
 void setVariables(SimpleHashMap variables)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elements

protected SimpleStack elements

variables

protected SimpleHashMap variables

scopeStack

protected SimpleStack scopeStack

includes

protected SimpleHashMap includes

rootPanes

protected SimpleStack rootPanes

childElements

protected SimpleStack childElements

currentElement

protected Element currentElement

packageList

protected PackageList packageList

currentFileName

protected String currentFileName

defaultScriptingLanguage

protected String defaultScriptingLanguage

window

protected Container window
Constructor Detail

WindowContext

public WindowContext()
Method Detail

isFileIncluded

public boolean isFileIncluded(String fileid)

includeFile

public void includeFile(String fileid)

getDefaultScriptingLanguage

public String getDefaultScriptingLanguage()
Returns the default Scripting Language.

Returns:
Returns the defaultScriptingLanguage.

setDefaultScriptingLanguage

public void setDefaultScriptingLanguage(String defaultScriptingLanguage)
Sets the default Scripting Language.

Parameters:
defaultScriptingLanguage - The defaultScriptingLanguage to set.

getCurrentFileName

public String getCurrentFileName()
Returns the current file name.

Returns:
Returns the currentFileName.

setCurrentFileName

public void setCurrentFileName(String currentFileName)
Sets the current file name.

Parameters:
currentFileName - The currentFileName to set.

pushStackFrame

public void pushStackFrame()

popStackFrame

public void popStackFrame()

pushRootPane

public void pushRootPane()

popRootPane

public JRootPane popRootPane()

getCurrentRootPane

public JRootPane getCurrentRootPane()

getPackageList

public PackageList getPackageList()
Returns:
Returns the packageList.

setPackageList

public void setPackageList(PackageList packageList)
Parameters:
packageList - The packageList to set.

getCurrentElement

public Element getCurrentElement()
Returns:
Returns the currentElement.

setCurrentElement

public void setCurrentElement(Element currentElement)
Parameters:
currentElement - The currentElement to set.

getChildElements

public SimpleStack getChildElements()
Returns:
Returns the childElements.

setChildElements

public void setChildElements(SimpleStack childElements)
Parameters:
childElements - The childElements to set.

getElements

public SimpleStack getElements()
Returns:
Returns the elements.

setElements

public void setElements(SimpleStack elements)
Parameters:
elements - The elements to set.

getRootPanes

public SimpleStack getRootPanes()
Returns:
Returns the rootPanes.

setRootPanes

public void setRootPanes(SimpleStack rootPanes)
Parameters:
rootPanes - The rootPanes to set.

addVariable

public void addVariable(Object symbol,
                        Object variable)
Parameters:
symbol - The name of the variable.
variable - The variable to add

getVariable

public Object getVariable(String varname)
Parameters:
varname - The variable to get
Returns:
Returns the variable

getVariables

public SimpleHashMap getVariables()
Returns:
Returns the variables.

setVariables

public void setVariables(SimpleHashMap variables)
Parameters:
variables - The variables to set.

getTarget

public Container getTarget()
Returns:
Returns the window.

setTarget

public void setTarget(Container target)
Parameters:
window - The window to set.

getType

public Class getType()
Returns:
Returns the type.

getApplet

public Applet getApplet()

getDialog

public Dialog getDialog()

getFrame

public Frame getFrame()

getWindow

public Window getWindow()

getJApplet

public JApplet getJApplet()

getJDialog

public JDialog getJDialog()

getJFrame

public JFrame getJFrame()

getJWindow

public JWindow getJWindow()

getJRootPane

public JRootPane getJRootPane()

getContentPane

public Container getContentPane()

getGlassPane

public Component getGlassPane()

getLayeredPane

public JLayeredPane getLayeredPane()

getJMenuBar

public JMenuBar getJMenuBar()

SourceForge.net
java.net

Copyright 2004-2005 Shawn Curry, http://jfcml.sourceforge.net
Licensed under the Academic Free License version 2.1