org.xmlhammer.gui
Class ProjectView

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by javax.swing.JPanel
                  extended by org.xmlhammer.gui.ProjectView
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, ModuleThreadListener
Direct Known Subclasses:
SchemaValidatorProjectView, StylesheetValidatorProjectView, XMLValidatorProjectView, XPathSearchProjectView, XSLTProjectView

public abstract class ProjectView
extends javax.swing.JPanel
implements ModuleThreadListener

The UI representation of a Project.

Version:
$Revision: 1.48 $, $Date: 2008/03/05 22:13:43 $
Author:
Edwin Dankert
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JPanel
javax.swing.JPanel.AccessibleJPanel
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  InputPage inputPage
           
protected  ParserPage parserPage
           
protected  Project project
           
protected  StatusBar statusBar
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ProjectView(ProjectsView parent, java.net.URI uri)
           
 
Method Summary
 void addPage(Page page)
           
 void checkForUpdate()
           
protected  InputPage createInputPage()
           
protected abstract  void createPages()
          Override when want to add new pages overridden.
protected  ParserPage createParserPage()
           
abstract  void dispose()
           
 void firePreferencesUpdated()
           
 AnimatedThread getAnimatedThread()
           
 ConsolePanel getConsolePanel()
           
 FieldManager getFieldManager()
           
abstract  java.lang.String getHelpID()
           
 javax.swing.Icon getIcon()
           
protected  InputPage getInputPage()
           
 JavaPanel getJavaPanel()
           
 long getLastModifiedTime()
           
 org.apache.log4j.Logger getLogger()
           
 LogPanel getLogPanel()
           
abstract  Module getModule()
           
 ModuleThread getModuleThread()
           
 OverviewPanel getOverviewPanel()
           
protected  ParserPage getParserPage()
           
 Project getProject()
           
 Project getProject(java.net.URI base)
           
 ProjectsView getProjectsView()
           
 ResultModel getResult()
           
 ResultPanel getResultPanel()
           
 Page getSelectedPage()
           
abstract  SourceBuilder getSource()
           
 StatusBar getStatusBar()
          Returns the status bar.
 ProjectUndoManager getUndoManager()
           
 java.net.URI getURI()
           
 boolean hasError()
           
protected  void initPages()
          Should be called by child constructor.
 boolean isChanged()
           
 boolean isSelected()
           
 void notifyChange(boolean changed)
           
 void setAnimatedThread(AnimatedThread thread)
           
 void setChanged(boolean changed)
           
 void setLastModifiedTime(long time)
           
 void setModuleThread(ModuleThread thread)
           
 void setProject(Project project)
          Set the project.
 void setSelected(boolean selected)
           
 void setURI(java.net.URI uri)
           
 void show(OverviewNode node)
           
 void showInitializationErrorMessage(java.lang.Exception exception)
           
 void showMessage(java.lang.String message, java.lang.String title)
           
abstract  void showPropertiesDialog()
          Show the properties dialog.
 void threadFinished(ModuleThread thread)
           
 void threadStarted(ModuleThread thread)
           
 void update()
           
protected  void updateSchemaLanguages()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

project

protected Project project

inputPage

protected InputPage inputPage

parserPage

protected ParserPage parserPage

statusBar

protected StatusBar statusBar
Constructor Detail

ProjectView

public ProjectView(ProjectsView parent,
                   java.net.URI uri)
Parameters:
parent - the projects view parent.
uri - the uri for the project.
Method Detail

initPages

protected void initPages()
Should be called by child constructor.


getOverviewPanel

public OverviewPanel getOverviewPanel()
Returns:
the project URI.

update

public void update()

getProjectsView

public ProjectsView getProjectsView()
Returns:
the underlying projects view.

getURI

public java.net.URI getURI()
Returns:
the project URI.

getLastModifiedTime

public long getLastModifiedTime()
Returns:
the last modified time.

hasError

public boolean hasError()

setLastModifiedTime

public void setLastModifiedTime(long time)
Parameters:
the - last modified time.

checkForUpdate

public void checkForUpdate()

setURI

public void setURI(java.net.URI uri)
Parameters:
the - view's URI.

createPages

protected abstract void createPages()
Override when want to add new pages overridden.


createParserPage

protected ParserPage createParserPage()

getParserPage

protected ParserPage getParserPage()

addPage

public void addPage(Page page)
Parameters:
page - the page to add.

createInputPage

protected InputPage createInputPage()

getInputPage

protected InputPage getInputPage()

getStatusBar

public StatusBar getStatusBar()
Returns the status bar.

Returns:
the status bar.

getResultPanel

public ResultPanel getResultPanel()
Returns:
the ResultPanel

getJavaPanel

public JavaPanel getJavaPanel()
Returns:
the ResultPanel

getLogPanel

public LogPanel getLogPanel()
Returns:
the LogPanel

getConsolePanel

public ConsolePanel getConsolePanel()
Returns:
the LogPanel

getProject

public Project getProject()
Returns:
the underlying project.

getProject

public Project getProject(java.net.URI base)
Returns:
the underlying project, setting input and parser values .

getLogger

public org.apache.log4j.Logger getLogger()
Returns:
the project Specific Logger.

firePreferencesUpdated

public void firePreferencesUpdated()

updateSchemaLanguages

protected void updateSchemaLanguages()

showPropertiesDialog

public abstract void showPropertiesDialog()
Show the properties dialog.


getModule

public abstract Module getModule()
Returns:
the module.

setModuleThread

public void setModuleThread(ModuleThread thread)
Parameters:
thread - the currently active thread that runs the project.

getSelectedPage

public Page getSelectedPage()

threadFinished

public void threadFinished(ModuleThread thread)
Specified by:
threadFinished in interface ModuleThreadListener

threadStarted

public void threadStarted(ModuleThread thread)
Specified by:
threadStarted in interface ModuleThreadListener

getModuleThread

public ModuleThread getModuleThread()
Returns:
the currently active thread running the project.

getResult

public ResultModel getResult()
Returns:
the result model.

setChanged

public void setChanged(boolean changed)
Parameters:
changed - updated when any of the project content has changed or when the project has been saved.

getSource

public abstract SourceBuilder getSource()

isChanged

public boolean isChanged()
Returns:
true when the project content has changed and needs to be saved.

notifyChange

public void notifyChange(boolean changed)
Parameters:
changed - true when the content has changed.

setSelected

public void setSelected(boolean selected)
Parameters:
selected - The selected to set.

isSelected

public boolean isSelected()
Returns:
Returns the selected.

getFieldManager

public FieldManager getFieldManager()
Returns:
the manager for the fields.

getUndoManager

public ProjectUndoManager getUndoManager()
Returns:
the manager for the fields.

setProject

public void setProject(Project project)
Set the project.

Parameters:
project - the project.

show

public void show(OverviewNode node)
Parameters:
node - the panel to show.

getIcon

public javax.swing.Icon getIcon()

dispose

public abstract void dispose()

showInitializationErrorMessage

public void showInitializationErrorMessage(java.lang.Exception exception)

setAnimatedThread

public void setAnimatedThread(AnimatedThread thread)

getAnimatedThread

public AnimatedThread getAnimatedThread()

getHelpID

public abstract java.lang.String getHelpID()

showMessage

public void showMessage(java.lang.String message,
                        java.lang.String title)


Copyright 2005-2005-2008 Edwin Dankert. All Rights Reserved.