|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.ObjectMultiPageEditorPart
org.formaria.editor.eclipse.project.pages.PagePanel
public class PagePanel
UI support for editing the a page. Opens the the XML in a separate window
Copyright (c) Formaria Ltd., 2008
$Revision: 1.60 $
License: see License.txt
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_COMPONENT_INSPECTOR_MODE
|
static java.lang.String |
DEFAULT_COMPONENT_PALETTE_MODE
|
static java.lang.String |
DEFAULT_COMPONENT_PROPERTIES_MODE
|
static java.lang.String |
DEFAULT_LAYER_PALETTE_MODE
|
static java.lang.String |
DEFAULT_STYLE_PALETTE_MODE
|
| Fields inherited from interface org.formaria.editor.project.pages.IPagePanel |
|---|
NO_OPTION, YES_OPTION |
| Constructor Summary | |
|---|---|
PagePanel()
Creates a multi-page editor example. |
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object component,
java.lang.Object constraint)
Add a component to the container |
void |
componentShowing()
|
IComponentInspector |
createInspector()
|
ILayerPalette |
createLayerPalette()
|
protected void |
createPages()
Creates the pages of the multi-page editor. |
IComponentPalette |
createPalette()
|
IComponentProperties |
createPropertiesPanel()
|
IStylePalette |
createStylePalette()
|
void |
dispose()
The MultiPageEditorPart implementation of this
IWorkbenchPart method disposes all nested editors. |
void |
doLayout()
Causes this container to lay out its components. |
void |
doSave(IProgressMonitor monitor)
Saves the multi-page editor's document. |
void |
doSaveAs()
Saves the multi-page editor's document as another file. |
java.lang.Object |
getChild(int idx)
|
int |
getChildCount()
|
java.lang.Object |
getComponent(int idx)
|
int |
getComponentCount()
Get the number of child components owned by this component, assuming that the component is a container. |
ILayerManager |
getLayerManager()
|
java.lang.String |
getName(java.lang.Object component)
Get the name of the object |
javax.swing.JPanel |
getPageContainer()
|
PageDesigner |
getPageDesigner()
|
PageResource |
getPageResource(java.lang.String name)
|
EditorProject |
getProject()
Get the project to which this page belongs. |
int |
getXmlEditorHash()
|
void |
gotoMarker(IMarker marker)
|
void |
hideComponents(boolean isClosing)
|
void |
init(IEditorSite site,
IEditorInput editorInput)
The MultiPageEditorExample implementation of this method
checks that the input is an instance of IFileEditorInput. |
boolean |
isDirty()
|
boolean |
isSaveAsAllowed()
|
protected void |
pageChange(int newPageIndex)
Calculates the contents of page 2 when the it is activated. |
void |
partActivated(IWorkbenchPart part)
Notifies this listener that the given part has been activated. |
void |
partBroughtToTop(IWorkbenchPart part)
Notifies this listener that the given part has been brought to the top. |
void |
partClosed(IWorkbenchPart part)
Notifies this listener that the given part has been closed. |
void |
partDeactivated(IWorkbenchPart part)
Notifies this listener that the given part has been deactivated. |
void |
partOpened(IWorkbenchPart part)
Notifies this listener that the given part has been opened. |
void |
regenerateXml()
|
void |
remove(java.lang.Object o)
Remove an object from the container |
void |
resourceChanged(IResourceChangeEvent event)
Closes all project files on project close. |
void |
saveState()
|
void |
setAllModified(java.lang.String pageName,
java.lang.String ext)
|
void |
setFocus()
|
void |
setInitializationData(IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
|
void |
setModified(boolean state)
|
void |
setOwner(java.lang.Object parent)
|
void |
showComponents()
|
int |
showConfirmDialog(java.lang.Object parent,
java.lang.String message,
java.lang.String title,
int type)
|
void |
showEventHandler(PageResource page,
java.awt.Component source,
java.lang.String methodName,
java.lang.Class klass,
boolean ctrlDown)
Show the Java source code at the point of the specified method |
void |
showEventHandler(PageResource page,
java.awt.Component source,
java.lang.String methodName,
long mask,
boolean ctrlDown)
Show the Java source code at the point of the specified method |
void |
showPage(int pageIdx)
|
void |
showPageEventHandler(PageResource page,
java.lang.String methodName,
boolean ctrlDown)
|
void |
showViews(boolean state)
|
void |
updatePageEditor()
|
void |
updateXmlEditor(java.lang.String xml)
|
void |
validate()
Validates this container and all of its subcomponents. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static java.lang.String DEFAULT_COMPONENT_PROPERTIES_MODE
public static java.lang.String DEFAULT_COMPONENT_INSPECTOR_MODE
public static java.lang.String DEFAULT_COMPONENT_PALETTE_MODE
public static java.lang.String DEFAULT_STYLE_PALETTE_MODE
public static java.lang.String DEFAULT_LAYER_PALETTE_MODE
| Constructor Detail |
|---|
public PagePanel()
| Method Detail |
|---|
public EditorProject getProject()
IPagePanel
getProject in interface IPagePanel
public void setInitializationData(IConfigurationElement config,
java.lang.String propertyName,
java.lang.Object data)
public void showPage(int pageIdx)
showPage in interface IPagePanelpublic void setOwner(java.lang.Object parent)
protected void createPages()
public void dispose()
MultiPageEditorPart implementation of this
IWorkbenchPart method disposes all nested editors.
Subclasses may extend.
public void partActivated(IWorkbenchPart part)
part - the part that was activatedIWorkbenchPage#activatepublic void partBroughtToTop(IWorkbenchPart part)
These events occur when an editor is brought to the top in the editor area,
or when a view is brought to the top in a page book with multiple views.
They are normally only sent when a part is brought to the top
programmatically (via IPerspective.bringToTop). When a part is
activated by the user clicking on it, only partActivated is sent.
part - the part that was surfacedIWorkbenchPage#bringToToppublic void partClosed(IWorkbenchPart part)
part - the part that was closedIWorkbenchPage#hideView(IViewPart)public void partDeactivated(IWorkbenchPart part)
part - the part that was deactivatedIWorkbenchPage#activate(IWorkbenchPart)public void partOpened(IWorkbenchPart part)
part - the part that was openedIWorkbenchPage#showView(String)public void doSave(IProgressMonitor monitor)
public void doSaveAs()
public void gotoMarker(IMarker marker)
public void init(IEditorSite site,
IEditorInput editorInput)
throws PartInitException
MultiPageEditorExample implementation of this method
checks that the input is an instance of IFileEditorInput.
PartInitExceptionpublic boolean isSaveAsAllowed()
protected void pageChange(int newPageIndex)
public void saveState()
public boolean isDirty()
public void resourceChanged(IResourceChangeEvent event)
public java.lang.String getName(java.lang.Object component)
component - The component instance
public int getComponentCount()
getComponentCount in interface IPagePanelpublic java.lang.Object getComponent(int idx)
getComponent in interface IPagePanel
public void setAllModified(java.lang.String pageName,
java.lang.String ext)
setAllModified in interface IPagePanelpublic void setModified(boolean state)
setModified in interface IPagePanelpublic int getXmlEditorHash()
getXmlEditorHash in interface IPagePanelpublic int getChildCount()
getChildCount in interface IPagePanelpublic java.lang.Object getChild(int idx)
getChild in interface IPagePanelpublic javax.swing.JPanel getPageContainer()
getPageContainer in interface IPagePanelpublic void updatePageEditor()
updatePageEditor in interface IPagePanelpublic void updateXmlEditor(java.lang.String xml)
updateXmlEditor in interface IPagePanelpublic void regenerateXml()
regenerateXml in interface IPagePanelpublic void remove(java.lang.Object o)
remove in interface IPagePanelo - the component to removepublic void doLayout()
validate method instead.
doLayout in interface IPagePanelLayoutManager.layoutContainer(java.awt.Container),
#setLayout,
validate()public void validate()
The validate method is used to cause a container
to lay out its subcomponents again. It should be invoked when
this container's subcomponents are modified (added to or
removed from the container, or layout-related information
changed) after the container has been displayed.
validate in interface IPagePanel#add(java.awt.Component),
Component.invalidate(),
JComponent.revalidate()
public void add(java.lang.Object component,
java.lang.Object constraint)
add in interface IPagePanelcomponent - the component to addconstraint - the layout constraintpublic IStylePalette createStylePalette()
createStylePalette in interface IPagePanelpublic IComponentPalette createPalette()
createPalette in interface IPagePanelpublic IComponentInspector createInspector()
createInspector in interface IPagePanelpublic IComponentProperties createPropertiesPanel()
createPropertiesPanel in interface IPagePanelpublic ILayerPalette createLayerPalette()
createLayerPalette in interface IPagePanelpublic void showViews(boolean state)
public void showComponents()
showComponents in interface IPagePanelpublic void hideComponents(boolean isClosing)
hideComponents in interface IPagePanel
public int showConfirmDialog(java.lang.Object parent,
java.lang.String message,
java.lang.String title,
int type)
showConfirmDialog in interface IPagePanel
public void showEventHandler(PageResource page,
java.awt.Component source,
java.lang.String methodName,
long mask,
boolean ctrlDown)
showEventHandler in interface EventHandlerEditorpage - the page resource that owns the methodsource - the component that initiates the eventmethodName - the response method namemask - the event mask
public void showEventHandler(PageResource page,
java.awt.Component source,
java.lang.String methodName,
java.lang.Class klass,
boolean ctrlDown)
showEventHandler in interface EventHandlerEditorpage - the page resource that owns the methodsource - the component that initiates the eventmethodName - the response method nameklass - the event class
public void showPageEventHandler(PageResource page,
java.lang.String methodName,
boolean ctrlDown)
showPageEventHandler in interface EventHandlerEditorpublic void setFocus()
public void componentShowing()
public PageResource getPageResource(java.lang.String name)
public PageDesigner getPageDesigner()
public ILayerManager getLayerManager()
getLayerManager in interface IPagePanel
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||