|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttreebolic.generator.Controller
public class Controller
Controller
Nested Class Summary | |
---|---|
static class |
Controller.Code
Command code |
static class |
Controller.Mode
Command code |
Field Summary | |
---|---|
private java.lang.String[] |
theArgs
Command line arguments |
private org.w3c.dom.Document |
theDocument
Document |
private DomTreeView |
theDomTreeView
Dom tree view |
private javax.swing.JFrame |
theFrame
Frame |
private java.util.Map<java.lang.String,MutableNode> |
theIdToNodeMap
Id to node map |
private Controller.Mode |
theMode
Document mode |
Model |
theModel
Treebolic model |
private PropertyView |
thePropertyView
|
private int |
theSelectedTabIndex
Tabbed pane selection index |
private java.util.Properties |
theSettings
Settings |
private javax.swing.JTabbedPane |
theTabbedPane
Tabbed pane |
private TextView |
theTextView
Text view |
javax.swing.tree.TreeModel |
theTreeModel
Tree model |
private TreeView |
theTreeView
Tree view |
java.util.Map<java.awt.Component,java.lang.Runnable> |
theUpdateMap
Map component to update action |
private java.net.URL |
theUrl
Document url |
private IWidget |
theWidget
Treebolic widget |
static boolean |
validate
XML validate |
Constructor Summary | |
---|---|
Controller(java.lang.String[] theseArgs)
Constructor |
Method Summary | |
---|---|
private void |
about()
About |
private java.lang.String |
ask(java.lang.String thisMessage,
java.lang.String thisInitial)
Ask |
private void |
base()
Get base |
private void |
checkSave()
Check if save is needed |
private boolean |
confirm(java.lang.String[] thisMessage)
Confirm |
void |
connect(DomTreeView thisDomTreeView)
Connect to Dom tree view |
void |
connect(IWidget thisWidget)
Connect to widget |
void |
connect(javax.swing.JFrame thisFrame)
Connect to frame |
void |
connect(javax.swing.JTabbedPane thisTabbedPane)
Connect to tabbed pane |
void |
connect(PropertyView thisPropertyView)
Connect to property view |
void |
connect(TextView thisTextView)
Connect to text view |
void |
connect(TreeView thisTreeView)
Connect to tree view |
void |
dtd()
Get Dtd |
void |
editingCanceled(javax.swing.event.ChangeEvent thisEvent)
|
void |
editingStopped(javax.swing.event.ChangeEvent thisEvent)
|
void |
execute(Controller.Code thisCode,
int thisValue)
|
void |
exit()
Exit hook |
private void |
exportDocument()
Export document |
private void |
exportSettings()
Export settings |
java.net.URL |
getBase()
Get base URL |
private static java.io.File |
getFile(java.lang.String thisUrlString)
Get file from Url |
private static java.io.File |
getFile(java.net.URL thisUrl)
Get file from Url |
java.net.URL |
getHtmlDocumentBase()
Get embedding HTML document base URL |
java.awt.Image |
getImage(java.net.URL thisURL)
Get image |
java.net.URL |
getImagesBase()
Get images base URL |
Model |
getModel()
Get model |
java.lang.String |
getParameter(java.lang.String thisName)
Get parameter |
private void |
help()
Help |
void |
hyperlinkUpdate(javax.swing.event.HyperlinkEvent thisEvent)
|
private void |
importProvider()
Import document from provider |
private void |
importXsl()
Import document through Xsl |
boolean |
linkTo(java.lang.String thisLinkUrl,
java.lang.String thisUrlTarget)
Navigate to link |
private void |
listIds()
List mounts |
private void |
listImages()
List images |
private void |
listLinks()
List links |
private void |
listMounts()
List mounts |
private java.net.URL |
makeBasedURL(java.lang.String thisSubPath,
java.lang.String thisFilename)
Make based Url |
private org.w3c.dom.Document |
makeDocument(Model thisModel)
Make document |
protected org.xml.sax.EntityResolver |
makeEntityResolver()
Make entity resolver (for validation) |
private HtmlView |
makeHtmlView(Controller thisController)
Make the Html view |
java.net.URL |
makeImageRepositoryURL()
Make image repository Url |
private IProvider |
makeProvider(java.lang.String thisProviderName)
Make provider |
private void |
makeSite()
Make site |
private TextView |
makeTextView()
Make the text view |
java.net.URL |
makeURL(java.lang.String thisSource)
Make Url |
private void |
newDocument()
New command |
private void |
newElement()
New element |
private void |
normalizeIds()
Normalize ids |
private void |
open()
Open |
void |
open(java.lang.String thisUrlString)
Open Url string |
private void |
open(java.net.URL thisUrl)
Open Url |
private void |
openUrl()
Open Http |
private void |
optionFocusParent()
Toggle focus parent behaviour in tree view |
private void |
optionTreebolicRenderer()
Toggle treebolic rendering in Dom tree view |
private void |
optionValidateXml()
Toggle XML validation |
void |
picked(java.lang.Object thisObject)
Pick event listener |
void |
putMessage(java.lang.String thisString)
Put status string (such as error) |
void |
putProgress(java.lang.String thisString,
boolean thisFail)
Put progress |
private void |
removeElement()
Remove element |
private void |
runSite()
Run site |
private void |
save()
Save |
private void |
save(java.io.File thisFile)
Save as file |
private void |
saveAs()
Save as |
private void |
select(java.lang.String thisClassName)
Select tree node |
private void |
setDocument(org.w3c.dom.Document thisDocument,
java.net.URL thisURL)
Set document |
private void |
setModel(Model thisModel,
java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap)
Set model |
private void |
settings()
Persist |
void |
showStatus(java.lang.String thisString)
Show status |
void |
stateChanged(javax.swing.event.ChangeEvent thisEvent)
|
void |
transformToFile(java.lang.String thisExportUrl,
java.lang.String thisXsltUrlString,
java.lang.String thisOutputFileUrl)
Transform to file |
void |
transformToView(java.lang.String thisExportUrl,
java.lang.String thisXsltUrlString)
Transform to view |
void |
update(Controller.Mode thisMode)
Update |
void |
updateDom()
Update Dom view |
void |
updateText()
Update xml text view |
void |
updateTree()
Update tree view |
void |
updateView()
Update current view |
void |
updateWidget()
Update widget view |
private void |
url()
Get Url |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private IWidget theWidget
public Model theModel
private java.util.Map<java.lang.String,MutableNode> theIdToNodeMap
private org.w3c.dom.Document theDocument
private java.net.URL theUrl
private Controller.Mode theMode
public static boolean validate
public javax.swing.tree.TreeModel theTreeModel
private TreeView theTreeView
private PropertyView thePropertyView
private TextView theTextView
private DomTreeView theDomTreeView
private javax.swing.JFrame theFrame
private javax.swing.JTabbedPane theTabbedPane
private int theSelectedTabIndex
private java.lang.String[] theArgs
public java.util.Map<java.awt.Component,java.lang.Runnable> theUpdateMap
private java.util.Properties theSettings
Constructor Detail |
---|
public Controller(java.lang.String[] theseArgs)
theseArgs
- command line argumentsMethod Detail |
---|
public void connect(javax.swing.JFrame thisFrame)
thisFrame
- framepublic void connect(TreeView thisTreeView)
thisTreeView
- treeviewpublic void connect(PropertyView thisPropertyView)
thisPropertyView
- property viewpublic void connect(TextView thisTextView)
thisTextView
- text viewpublic void connect(DomTreeView thisDomTreeView)
thisDomTreeView
- DOM tree viewpublic void connect(IWidget thisWidget)
thisWidget
- widgetpublic void connect(javax.swing.JTabbedPane thisTabbedPane)
thisTabbedPane
- tabbed paneprivate org.w3c.dom.Document makeDocument(Model thisModel)
private void setDocument(org.w3c.dom.Document thisDocument, java.net.URL thisURL)
thisDocument
- documentthisURL
- urlpublic Model getModel()
private void setModel(Model thisModel, java.util.Map<java.lang.String,MutableNode> thisIdToNodeMap)
thisModel
- modelthisIdToNodeMap
- id to node mappublic void picked(java.lang.Object thisObject)
PickListener
picked
in interface PickListener
thisObject
- parameterpublic void stateChanged(javax.swing.event.ChangeEvent thisEvent)
stateChanged
in interface javax.swing.event.ChangeListener
public void editingStopped(javax.swing.event.ChangeEvent thisEvent)
editingStopped
in interface javax.swing.event.CellEditorListener
public void editingCanceled(javax.swing.event.ChangeEvent thisEvent)
editingCanceled
in interface javax.swing.event.CellEditorListener
public void hyperlinkUpdate(javax.swing.event.HyperlinkEvent thisEvent)
hyperlinkUpdate
in interface javax.swing.event.HyperlinkListener
public void execute(Controller.Code thisCode, int thisValue)
public void exit()
private void newDocument()
private void open()
private void openUrl()
public void open(java.lang.String thisUrlString)
thisUrlString
- Url stringprivate void open(java.net.URL thisUrl)
thisUrl
- Urlprotected org.xml.sax.EntityResolver makeEntityResolver()
private static java.io.File getFile(java.net.URL thisUrl)
thisUrl
- Url
private static java.io.File getFile(java.lang.String thisUrlString)
thisUrlString
- url string
private void save()
private void saveAs()
private void save(java.io.File thisFile)
thisFile
- fileprivate void checkSave()
private void importXsl()
private void importProvider()
private void exportDocument()
private void exportSettings()
private void newElement()
private void removeElement()
private void normalizeIds()
private void listImages()
private void listLinks()
private void listMounts()
private void listIds()
public void dtd()
private void optionTreebolicRenderer()
private void optionValidateXml()
private void optionFocusParent()
public void transformToView(java.lang.String thisExportUrl, java.lang.String thisXsltUrlString)
public void transformToFile(java.lang.String thisExportUrl, java.lang.String thisXsltUrlString, java.lang.String thisOutputFileUrl)
private void makeSite()
private void runSite()
private void settings()
private void base()
private void url()
private void help()
private void about()
private boolean confirm(java.lang.String[] thisMessage)
thisMessage
- message
private java.lang.String ask(java.lang.String thisMessage, java.lang.String thisInitial)
thisMessage
- message
private void select(java.lang.String thisClassName)
thisClassName
- class name of tree node to selectpublic void update(Controller.Mode thisMode)
thisMode
- modepublic void updateView()
public void updateTree()
public void updateWidget()
public void updateText()
public void updateDom()
private HtmlView makeHtmlView(Controller thisController)
private TextView makeTextView()
public java.net.URL makeImageRepositoryURL()
private java.net.URL makeBasedURL(java.lang.String thisSubPath, java.lang.String thisFilename)
thisSubPath
- if not null this this the extra path to add to the basethisFilename
- filename
public java.net.URL makeURL(java.lang.String thisSource)
makeURL
in interface IProviderContext
thisSource
-
IProviderContext.getParameter(java.lang.String)
private IProvider makeProvider(java.lang.String thisProviderName)
thisProviderName
- provider name
public java.net.URL getBase()
IContext
getBase
in interface IContext
public java.net.URL getHtmlDocumentBase()
IContext
getHtmlDocumentBase
in interface IContext
public java.net.URL getImagesBase()
IContext
getImagesBase
in interface IContext
public java.awt.Image getImage(java.net.URL thisURL)
IContext
getImage
in interface IContext
thisURL
- url
public java.lang.String getParameter(java.lang.String thisName)
IContext
getParameter
in interface IContext
getParameter
in interface IProviderContext
thisName
- parameter name
public boolean linkTo(java.lang.String thisLinkUrl, java.lang.String thisUrlTarget)
IContext
linkTo
in interface IContext
thisLinkUrl
- link urlthisUrlTarget
- link target
public void showStatus(java.lang.String thisString)
IContext
showStatus
in interface IContext
thisString
- messagepublic void putMessage(java.lang.String thisString)
IProviderContext
putMessage
in interface IProviderContext
thisString
- messagepublic void putProgress(java.lang.String thisString, boolean thisFail)
IProviderContext
putProgress
in interface IProviderContext
thisString
- message
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |