|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.viewer.AbstractNodeViewer | +--com.borland.jbuilder.designer.DesignerViewer
Extension of AbstractNodeViewer for the design tab.
Fields inherited from class com.borland.primetime.viewer.AbstractNodeViewer |
context, structureComponent, viewerComponent |
Fields inherited from interface com.borland.primetime.ide.NodeViewer |
EMPTY_ARRAY, PROP_DESCRIPTION, PROP_ICON, PROP_STRUCTURE_COMPONENT, PROP_TITLE, PROP_VIEWER_COMPONENT |
Constructor Summary | |
DesignerViewer(Context context)
Constructs a new DesignerViewer. |
Method Summary | |
void |
activateDesignView(Designer designer)
Activates the design view for the given designer. |
void |
activateDesignViewImpl(Designer designer)
Updates the DesignView |
static void |
addDesignerMessage(java.lang.String s,
java.lang.Throwable t)
Adds a message to the Designer tab of the message view. |
static com.borland.jbuilder.cmt.CmtModelNode |
addNode(com.borland.jbuilder.cmt.CmtSubcomponent subcomponent)
Adds a new component (with subcomponent) to the models given a class name, at no specific location |
static com.borland.jbuilder.cmt.CmtModelNode |
addNode(com.borland.jbuilder.cmt.CmtSubcomponent subcomponent,
com.borland.jbuilder.cmt.CmtModelNode targetNode)
Adds a new subComponent (with node) to the models ,determining its target from the current selection |
com.borland.jbuilder.cmt.CmtModelNode |
addNode(java.lang.String componentClassName)
Adds a new component (with node) to the models given a class name, at no specific location |
com.borland.jbuilder.cmt.CmtModelNode |
addNode(java.lang.String componentClassName,
com.borland.jbuilder.cmt.CmtModelNode targetNode)
Adds a new component (with node) to the models given a class name and a specific target node. |
void |
addToClassPath(java.lang.String className)
Adds a new class name onto the classPath for the current project. |
void |
browserActivated()
Handles notification of Browser being activated. |
void |
buildFinished()
Handles notification of when a project is finished building. |
void |
changeUrl(Url url)
Prepare to edit a component, opening it if necessary. |
void |
commit()
Validates window panes after a user action has been performed, and commits the user action. |
void |
copy(boolean cut)
Copy a component to the clipboard. |
javax.swing.JComponent |
createStructureComponent()
Creates the UI component to display in the Structure Pane of the Browser. |
javax.swing.JComponent |
createViewerComponent()
Creates the UI component (an HTMLViewerComponent) to display in the Browser. |
Designer |
edit(com.borland.jbuilder.cmt.CmtModelNode treeNode)
Edits (opens and activates) a given node using its associated designer view. |
java.awt.Component |
getActiveDesignView()
Retrieves the design view for the active designer. |
com.borland.jbuilder.cmt.CmtComponent |
getClipboard()
Retrieve the clipboard instance |
com.borland.jbuilder.cmt.CmtComponents |
getComponents()
Retrieves the components belonging to the current JBuilder project. |
com.borland.jbuilder.cmt.CmtComponentSource |
getComponentSource()
Retrieves the component source for the components in the current project. |
java.awt.Component |
getDesignToolbar(Designer designer)
Retrieves the toolbar assigned to the given designer. |
java.awt.Component |
getDesignView(Designer designer)
Retrieves the current design view for this context. |
com.borland.jbuilder.designer.inspector.Inspector |
getInspector()
Retrieves the Inspector instance. |
int |
getMode()
Retrieves the current Designer mode. |
JBProject |
getProject()
Retrieves the current JBuilder project. |
javax.swing.tree.TreeSelectionModel |
getSelection()
Retrieves the current selection model. |
com.borland.jbuilder.cmt.CmtSubcomponent[] |
getSubcomponents()
Returns an array of CmtSubcomponents belonging to the current Component under design |
java.lang.String |
getToolInitializer()
Retrieves the initializer for the current palette. |
java.lang.String |
getToolName()
Retrieves the name of the currently selected palette tool. |
static javax.swing.tree.TreePath |
getTreePath(javax.swing.tree.TreeNode node)
Retrieves the TreePath for the given node. |
java.lang.String |
getViewerDescription()
Retrieves the DesignerViewer description string. |
java.lang.String |
getViewerTitle()
Retrieves the DesignerViewer title string. |
void |
gotoMethod(java.lang.String methodName,
java.lang.String[] params)
Opens the editor for the current class being designed and scrolls to the given method. |
boolean |
hideInspector(javax.swing.JComponent newView,
boolean userAction)
Hides the designer Inspector. |
void |
lookupHelp(java.lang.String className)
Brings up the help browser loaded with the documentation for the given class name. |
void |
lookupHelp(java.lang.String className,
java.lang.String propertyName)
Brings up the help browser loaded with the documentation for the given class and the given property. |
void |
mouseClicked(java.awt.event.MouseEvent e)
Handles a mouse clicked event. |
void |
mouseEntered(java.awt.event.MouseEvent e)
Handles a mouse entered event. |
void |
mouseExited(java.awt.event.MouseEvent e)
Handles a mouse exited event. |
void |
mousePressed(java.awt.event.MouseEvent e)
Handles a mouse pressed event. |
void |
mouseReleased(java.awt.event.MouseEvent e)
Handles a mouse released event. |
void |
open(boolean freshOpen)
Opens/reopens a component for editing. |
void |
openImpl(boolean freshOpen)
Opens/reopens a component for editing, given its corresponding classname and/or a filename. |
com.borland.jbuilder.cmt.CmtModelNode[] |
paste()
Retrieves a set of component nodes from the clipboard for pasting. |
com.borland.jbuilder.cmt.CmtModelNode[] |
paste(java.awt.Point relLocation)
Retrieves and pastes a set of component nodes from the clipboard to the location specified. |
void |
releaseViewer()
Called when the context being viewed has been closed. |
boolean |
remove(com.borland.jbuilder.cmt.CmtModelNode treeNode)
Removes the specified component node. |
void |
removeSelectedNodes()
Removes the selected components nodes. |
void |
setBusy(boolean b)
Changes UI to indicate either a busy state or a ready state. |
void |
setDesignToolbar(Designer designer,
java.awt.Component toolbar)
Associates the given toolbar to the given designer instance. |
void |
setDesignView(Designer designer,
java.awt.Component view)
Callback for designers to set the design view for this context for a given designer. |
static void |
setStatusText(java.lang.String text)
Specifies the text string for the browser status bar. |
boolean |
showInspector(javax.swing.JComponent newView,
boolean userAction)
Displays the designer Inspector. |
void |
toolUsed()
Retrieves the tool currently in use. |
void |
viewerActivated(boolean requestFocus)
Notification that this viewer has been activated. |
Methods inherited from class com.borland.primetime.viewer.AbstractNodeViewer |
addPropertyChangeListener, browserDeactivated, firePropertyChange, getContext, getStructureComponent, getViewerComponent, getViewerIcon, removePropertyChangeListener, viewerDeactivated, viewerDeactivating, viewerNodeChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static MessageCategory designerCategory
public UpdateAction ACTION_DesignerUndo
public UpdateAction ACTION_DesignerRedo
public UpdateAction ACTION_DesignerCut
public UpdateAction ACTION_DesignerCopy
public UpdateAction ACTION_DesignerPaste
public boolean firstTime
Constructor Detail |
public DesignerViewer(Context context)
Constructs a new DesignerViewer.
context
- context (browser/node pair) for which the viewer is to
be constructedMethod Detail |
public static void addDesignerMessage(java.lang.String s, java.lang.Throwable t)
Adds a message to the Designer tab of the message view.
s
- the message stringt
- throwable exception object. Unused.public java.lang.String getViewerTitle()
Retrieves the DesignerViewer title string.
com.borland.primetime.ide.NodeViewer
public java.lang.String getViewerDescription()
Retrieves the DesignerViewer description string.
getViewerDescription
in class AbstractNodeViewer
com.borland.primetime.viewer.AbstractNodeViewer
public javax.swing.JComponent createViewerComponent()
Creates the UI component (an HTMLViewerComponent) to display in the Browser.
createViewerComponent
in class AbstractNodeViewer
public void releaseViewer()
Called when the context being viewed has been closed. Releases the DesignerViewer resources (i.e. palette, inspector) in use.
releaseViewer
in class AbstractNodeViewer
public javax.swing.JComponent createStructureComponent()
Creates the UI component to display in the Structure Pane of the Browser.
createStructureComponent
in class AbstractNodeViewer
public void viewerActivated(boolean requestFocus)
Notification that this viewer has been activated. This method is called after getViewerComponent(...) has returned a Component that has been placed in the correct location in the Browser, getStructureComponent(...) has returned a Component that has been placed in the correct location in the Browser, and the tab has switched to view the new viewer.
viewerActivated
in class AbstractNodeViewer
requestFocus
- indicates whether the viewer component should request
focus at this pointpublic JBProject getProject()
Retrieves the current JBuilder project.
public com.borland.jbuilder.cmt.CmtComponents getComponents()
Retrieves the components belonging to the current JBuilder project.
public com.borland.jbuilder.cmt.CmtComponentSource getComponentSource()
Retrieves the component source for the components in the current project.
public void open(boolean freshOpen)
Opens/reopens a component for editing.
Calls openImpl method to do the actual opening.
freshOpen
- indicates whether this is a new open request as opposed
to a reopen requestpublic void openImpl(boolean freshOpen)
Opens/reopens a component for editing, given its corresponding classname and/or a filename.
Performs the following sequence:
freshOpen
- indicates whether this is a new open request as opposed
to a reopen requestpublic com.borland.jbuilder.cmt.CmtComponent getClipboard()
Retrieve the clipboard instance
public void changeUrl(Url url)
Prepare to edit a component, opening it if necessary.
url
- unusedpublic void copy(boolean cut)
Copy a component to the clipboard.
cut
- true if copy is actually a cut operation, otherwise falsepublic com.borland.jbuilder.cmt.CmtSubcomponent[] getSubcomponents()
Returns an array of CmtSubcomponents belonging to the current Component under design
public javax.swing.tree.TreeSelectionModel getSelection()
Retrieves the current selection model.
public com.borland.jbuilder.cmt.CmtModelNode[] paste()
Retrieves a set of component nodes from the clipboard for pasting.
public com.borland.jbuilder.designer.inspector.Inspector getInspector()
Retrieves the Inspector instance.
public com.borland.jbuilder.cmt.CmtModelNode[] paste(java.awt.Point relLocation)
Retrieves and pastes a set of component nodes from the clipboard to the location specified.
public void setBusy(boolean b)
Changes UI to indicate either a busy state or a ready state.
b
- true if busy state, otherwise falsepublic Designer edit(com.borland.jbuilder.cmt.CmtModelNode treeNode)
Edits (opens and activates) a given node using its associated designer view.
node
- the model nodepublic void setDesignView(Designer designer, java.awt.Component view)
Callback for designers to set the design view for this context for a given designer.
designer
- designer to which a view is to be setview
- design view to setpublic java.awt.Component getDesignView(Designer designer)
Retrieves the current design view for this context.
designer
- designer from which the view is to be retrievedpublic java.awt.Component getActiveDesignView()
Retrieves the design view for the active designer.
public void setDesignToolbar(Designer designer, java.awt.Component toolbar)
Associates the given toolbar to the given designer instance.
designer
- designer target for toolbartoolbar
- toolbar to associatepublic java.awt.Component getDesignToolbar(Designer designer)
Retrieves the toolbar assigned to the given designer.
designer
- designer owning the toolbar requestedpublic boolean showInspector(javax.swing.JComponent newView, boolean userAction)
Displays the designer Inspector.
newView
- new Inspector viewuserAction
- true if user uses explicit action to turn on the
Inspector view, otherwise falsepublic boolean hideInspector(javax.swing.JComponent newView, boolean userAction)
Hides the designer Inspector.
newView
- inspector viewuserAction
- true if Inspector view is being closed through direct
user actionpublic void activateDesignView(Designer designer)
Activates the design view for the given designer.
designer
- designer containing view to activatepublic void browserActivated()
Handles notification of Browser being activated.
browserActivated
in class AbstractNodeViewer
public void activateDesignViewImpl(Designer designer)
Updates the DesignView
public void removeSelectedNodes()
Removes the selected components nodes.
public boolean remove(com.borland.jbuilder.cmt.CmtModelNode treeNode)
Removes the specified component node.
treeNode
- component node to removeNote that this return value is not necessarily an indication of the node being successfully removed.
public com.borland.jbuilder.cmt.CmtModelNode addNode(java.lang.String componentClassName)
Adds a new component (with node) to the models given a class name, at no specific location
componentClassName
- class name of component to addpublic static com.borland.jbuilder.cmt.CmtModelNode addNode(com.borland.jbuilder.cmt.CmtSubcomponent subcomponent)
Adds a new component (with subcomponent) to the models given a class name, at no specific location
subcomponent
- new component to addpublic static com.borland.jbuilder.cmt.CmtModelNode addNode(com.borland.jbuilder.cmt.CmtSubcomponent subcomponent, com.borland.jbuilder.cmt.CmtModelNode targetNode)
Adds a new subComponent (with node) to the models ,determining its target from the current selection
subcomponent
- new component node to addtargetNode
- target node to which subcomponent is to be addedpublic com.borland.jbuilder.cmt.CmtModelNode addNode(java.lang.String componentClassName, com.borland.jbuilder.cmt.CmtModelNode targetNode)
Adds a new component (with node) to the models given a class name and a specific target node.
componentClassName
- targetNode
- public void commit()
Validates window panes after a user action has been performed, and commits the user action.
public int getMode()
Retrieves the current Designer mode. The Designer modes are:
public java.lang.String getToolName()
Retrieves the name of the currently selected palette tool.
public java.lang.String getToolInitializer()
Retrieves the initializer for the current palette.
public void toolUsed()
Retrieves the tool currently in use.
public void addToClassPath(java.lang.String className)
Adds a new class name onto the classPath for the current project.
className
- new class name to add to classPathpublic void gotoMethod(java.lang.String methodName, java.lang.String[] params)
Opens the editor for the current class being designed and scrolls to the given method.
methodName
- name of method to which to scrollparams
- parameter signature of the methodpublic static void setStatusText(java.lang.String text)
Specifies the text string for the browser status bar.
text
- text string to be displayed in browser status barpublic void lookupHelp(java.lang.String className)
Brings up the help browser loaded with the documentation for the given class name.
className
- name of class for which documentation is requestedpublic void lookupHelp(java.lang.String className, java.lang.String propertyName)
Brings up the help browser loaded with the documentation for the given class and the given property.
className
- name of class for which documentation is requestedpropertyName
- name of class propertypublic void buildFinished()
Handles notification of when a project is finished building.
public static javax.swing.tree.TreePath getTreePath(javax.swing.tree.TreeNode node)
Retrieves the TreePath for the given node.
node
- given tree nodepublic void mouseClicked(java.awt.event.MouseEvent e)
Handles a mouse clicked event. Currently unimplemented.
mouseClicked
in interface java.awt.event.MouseListener
e
- mouse clicked event objectpublic void mousePressed(java.awt.event.MouseEvent e)
Handles a mouse pressed event. Currently unimplemented.
mousePressed
in interface java.awt.event.MouseListener
e
- mouse pressed event objectpublic void mouseReleased(java.awt.event.MouseEvent e)
Handles a mouse released event. This method manages dropping a component into the active designer.
mouseReleased
in interface java.awt.event.MouseListener
e
- mouse released event objectpublic void mouseEntered(java.awt.event.MouseEvent e)
Handles a mouse entered event. This method manages the cursor display based on the current Designer mode.
mouseEntered
in interface java.awt.event.MouseListener
e
- mouse entered event objectpublic void mouseExited(java.awt.event.MouseEvent e)
Handles a mouse exited event. Currently unimplemented.
mouseExited
in interface java.awt.event.MouseListener
e
- mouse exited event object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |