CS 1705 Library

cs1705.web
Class Import

java.lang.Object
  extended by org.zkoss.zk.ui.AbstractComponent
      extended by org.zkoss.zhtml.Text
          extended by cs1705.web.internal.JavaStatementElement
              extended by cs1705.web.Import
All Implemented Interfaces:
Serializable, Cloneable, Component, RawId, ComponentCtrl

public class Import
extends cs1705.web.internal.JavaStatementElement

A ZUL import statement for Java classes.

An <import> tag takes a single property. For convenience, you can spell this property in two different ways, depending on what makes your code more readable:

Parameters
class - The name of a single Java class to import, or
classes - The name of a Java package, plus ".*", to import all classes in a package

Examples:

 <!-- Import a single class -->
 <import class="java.io.File"/>

 <!-- Import a whole package -->
 <import classes="java.util.*"/>
 

Version:
2007.08.13
Author:
Stephen Edwards
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
 
Constructor Summary
Import()
          Creates a new Import component.
 
Method Summary
 String getClasses()
          Accessor for the "classes" property.
 void setClass(String newClass)
          Mutator for the "class" property.
 void setClasses(String newClasses)
          Mutator for the "classes" property.
 
Methods inherited from class cs1705.web.internal.JavaStatementElement
redraw
 
Methods inherited from class org.zkoss.zhtml.Text
getValue, invalidate, isChildable, setParent, setValue
 
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addEventHandler, addEventListener, addForward, addForward, addForward, addForward, addSharedAnnotationMap, addSharedEventHandlerMap, appendChild, applyProperties, clone, containsVariable, detach, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttributes, getAttributes, getChildren, getCommand, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getExtraCtrl, getFellow, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNamespace, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getSpaceOwner, getUuid, getVariable, hasFellow, insertBefore, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onDrawNewChild, onPageAttached, onPageDetached, onWrongValue, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, response, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setComponentDefinition, setId, setMold, setPage, setPageBefore, setVariable, setVisible, smartUpdate, smartUpdate, smartUpdate, smartUpdateDeferred, smartUpdateValues, toString, unsetVariable
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Import

public Import()
Creates a new Import component.

Method Detail

setClass

public void setClass(String newClass)
Mutator for the "class" property. Note that there is no corresponding accessor, since Object.getClass() performs a different (and important!) function.

Parameters:
newClass - The name of the Java class to import

getClasses

public String getClasses()
Accessor for the "classes" property.

Returns:
The class pattern to be imported

setClasses

public void setClasses(String newClasses)
Mutator for the "classes" property.

Parameters:
newClasses - The Java package pattern to import (e.g., "some.package.*").

Last updated: Wed, Apr 1, 2009 • 12:29 AM EDT

Copyright © 2009 Virginia Tech.