ch.uzh.ifi.attempto.acewiki.gui
Class WikiPage

java.lang.Object
  extended by nextapp.echo.app.Component
      extended by nextapp.echo.app.Column
          extended by ch.uzh.ifi.attempto.acewiki.gui.WikiPage
All Implemented Interfaces:
java.io.Serializable, nextapp.echo.app.RenderIdSupport
Direct Known Subclasses:
AboutPage, ArticlePage, AssignmentsPage, ErrorPage, HierarchyPage, IndexPage, IndividualsPage, ReferencesPage, SearchPage, SentencePage

public abstract class WikiPage
extends nextapp.echo.app.Column

This is the superclass of all page classes. It represents a wiki page of AceWiki.

Author:
Tobias Kuhn
See Also:
Serialized Form

Field Summary
 
Fields inherited from class nextapp.echo.app.Column
PROPERTY_BORDER, PROPERTY_CELL_SPACING, PROPERTY_INSETS
 
Fields inherited from class nextapp.echo.app.Component
CHILD_VISIBLE_CHANGED_PROPERTY, CHILDREN_CHANGED_PROPERTY, ENABLED_CHANGED_PROPERTY, FOCUS_NEXT_ID_CHANGED_PROPERTY, FOCUS_PREVIOUS_ID_CHANGED_PROPERTY, LAYOUT_DIRECTION_CHANGED_PROPERTY, LOCALE_CHANGED_PROPERTY, PROPERTY_BACKGROUND, PROPERTY_FONT, PROPERTY_FOREGROUND, PROPERTY_LAYOUT_DATA, STYLE_CHANGED_PROPERTY, STYLE_NAME_CHANGED_PROPERTY, VISIBLE_CHANGED_PROPERTY
 
Constructor Summary
WikiPage(Wiki wiki)
          Initializes a new wiki page.
 
Method Summary
protected  void addHeadline(java.lang.String text)
          Adds a headline to the page content.
protected  void addHeadline(java.lang.String text, nextapp.echo.app.Component comp)
          Adds a headline to the page content.
protected  void addHorizontalLine()
          Adds a horizontal line to the page content.
protected  void addSelectedTab(java.lang.String tabName)
          Adds a new tab to the tab row that is currently selected.
protected  void addTab(java.lang.String tabName, nextapp.echo.app.event.ActionListener actionListener)
          Adds a new tab to the tab row.
protected  void doUpdate()
          Updates the page content.
abstract  boolean equals(java.lang.Object obj)
           
protected  java.lang.String getHeading(OntologyElement oe)
          Returns the heading text for the given ontology element.
 Wiki getWiki()
          Returns the wiki instance this page belongs to.
 boolean isExpired()
          Checks if the page has expired.
protected  void log(java.lang.String type, java.lang.String text)
          Writes a log entry.
 void update()
          Checks whether the page still exists and updates the page content.
 
Methods inherited from class nextapp.echo.app.Column
getBorder, getCellSpacing, getInsets, setBorder, setCellSpacing, setInsets
 
Methods inherited from class nextapp.echo.app.Component
add, add, addPropertyChangeListener, addPropertyChangeListener, dispose, firePropertyChange, get, getApplicationInstance, getBackground, getComponent, getComponent, getComponentCount, getComponents, getEventListenerList, getFocusNextId, getFocusPreviousId, getFont, getForeground, getId, getIndex, getLayoutData, getLayoutDirection, getLocale, getLocalStyle, getParent, getRenderId, getRenderIndexedProperty, getRenderIndexedProperty, getRenderLocale, getRenderProperty, getRenderProperty, getStyle, getStyleName, getVisibleComponent, getVisibleComponentCount, getVisibleComponents, hasEventListenerList, indexOf, init, isAncestorOf, isEnabled, isFocusTraversalParticipant, isRegistered, isRenderEnabled, isRenderVisible, isValidChild, isValidParent, isVisible, processInput, remove, remove, removeAll, removePropertyChangeListener, removePropertyChangeListener, set, setBackground, setComponents, setEnabled, setFocusNextId, setFocusPreviousId, setFocusTraversalParticipant, setFont, setForeground, setId, setIndex, setLayoutData, setLayoutDirection, setLocale, setRenderId, setStyle, setStyleName, setVisible, validate, verifyInput, visibleIndexOf
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WikiPage

public WikiPage(Wiki wiki)
Initializes a new wiki page.

Parameters:
wiki - The wiki instance.
Method Detail

update

public final void update()
Checks whether the page still exists and updates the page content.


doUpdate

protected void doUpdate()
Updates the page content.


getWiki

public Wiki getWiki()
Returns the wiki instance this page belongs to.

Returns:
The wiki instance.

log

protected void log(java.lang.String type,
                   java.lang.String text)
Writes a log entry.

Parameters:
type - The type of the log entry.
text - The log text.

isExpired

public boolean isExpired()
Checks if the page has expired. A page has expired it represents an ontology element that has been deleted.

Returns:
true if the page has expired.

addTab

protected void addTab(java.lang.String tabName,
                      nextapp.echo.app.event.ActionListener actionListener)
Adds a new tab to the tab row.

Parameters:
tabName - The name of the tab.
actionListener - The actionlistener.

addSelectedTab

protected void addSelectedTab(java.lang.String tabName)
Adds a new tab to the tab row that is currently selected.

Parameters:
tabName - The name of the tab.

addHorizontalLine

protected void addHorizontalLine()
Adds a horizontal line to the page content.


addHeadline

protected void addHeadline(java.lang.String text)
Adds a headline to the page content.

Parameters:
text - The headline text.

addHeadline

protected void addHeadline(java.lang.String text,
                           nextapp.echo.app.Component comp)
Adds a headline to the page content. The component is shown after the headline text.

Parameters:
text - The headline text.
comp -

getHeading

protected java.lang.String getHeading(OntologyElement oe)
Returns the heading text for the given ontology element.

Parameters:
oe - The ontology element.
Returns:
The heading.

equals

public abstract boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object


Copyright 2008-2012, AceWiki developers