| javax.swing.JPanel net.xoetrope.builder.editor.XPageHolder
XPageHolder | public class XPageHolder extends JPanel implements XPageDisplay,ActionListener,ItemListener,KeyListener,MouseListener,MouseMotionListener,SizerListener,ProjectListener,MenuListener,ComponentListener(Code) | | Description:
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
$Revision: 1.20 $
|
Method Summary | |
public void | actionPerformed(ActionEvent e) | public void | addComponentSelectionListener(ComponentSelectListener listener) | public void | addListeners(Container page, XEditorEventHandler eventHandler) | public Component | addNewComponent(Component comp, Point pt) | public void | addTarget(String name, Object constraint, int preferredWidth, int preferredHeight) | public void | addTarget(XTarget frame, Object constraint) | public void | alignSelectedComponents(int command) | public void | clearSelectedComponents() | public void | componentHidden(ComponentEvent e) | public void | componentMoved(ComponentEvent e) | public void | componentResized(ComponentEvent e) | public void | componentShown(ComponentEvent e) | public void | componentSized() | public void | copy() Add all of the selected components to the componentClipboard Vector. | public void | cut() Call copy which adds all of the selected components to the componentClipboard
Vector. | public void | deleteSelection() | public XPage | displayPage(XPage page) | public XPage | displayPage(XPage page, String target) | public XPageResource | findPageResource(String screenName) | protected Container | findTarget(Container container, String target) | public Container | findTarget(String target) | public void | focusGained(FocusEvent e) | public void | focusLost(FocusEvent e) | public XPageResource | getContentPage() | public void | getContextMenu(JPopupMenu popupMenu, AWTEvent evt) | public XPageResource | getCurrentPage() | public XGuidePane | getGuidePane() | public int | getNumTargets() | public XPageResource | getPageResource(Component comp) | Vector | getSelectedComponents() | public Container | getTarget(int idx) | public boolean | hasFrames() | public boolean | hasGuides() | public boolean | hasPageBorders() | public boolean | hasPasteContent() | public boolean | isAddingComponent() | public void | itemStateChanged(ItemEvent e) | public void | keyPressed(KeyEvent e) | public void | keyReleased(KeyEvent e) | public void | keyTyped(KeyEvent e) | public void | loadFrames(boolean showFrames) | public XPageResource | loadPage(String pageName, String target, int pageWidth, int pageHeight) | public void | menuCanceled(MenuEvent e) | public void | menuDeselected(MenuEvent e) | public void | menuSelected(MenuEvent e) | public void | mouseClicked(MouseEvent evt) | public void | mouseDragged(MouseEvent evt) | public void | mouseEntered(MouseEvent evt) | public void | mouseExited(MouseEvent evt) | public void | mouseMoved(MouseEvent evt) | public void | mousePressed(MouseEvent evt) | public void | mouseReleased(MouseEvent evt) | public void | paste() first check that the componentClipboard is not null and then effectively clone
each component found in it. | public void | projectLoaded(XEditorProject project) | public void | projectUpdated() | protected void | removeEventListeners(XPageResource pageResource, XEditorEventHandler handler, Container cont) Adds the event handlers. | public void | removeListeners(Container page, XEventHandler eventHandler) | void | resetListeners() | public void | resetStyles() | public void | selectComponent(Component selection, boolean init) | public void | setEditorComponentListener(EditorComponentListener listener) | public void | setEventHandlerEditor(EventHandlerEditor ehe) | protected void | setEventListeners(XPage page, XPageResource pageResource, Container cont) Adds the event handlers. | void | setLaf(Container cont, ButtonUI ui) | public void | setPage(XPage page) | public void | showGuides(boolean showGuides) | public void | showLaf(boolean showSystemLaf) Use the system look and feel. | public void | showPages(boolean showPages) | void | sizeGuidePane() | public void | textValueChanged(TextEvent e) | protected void | togglePreview() Toggle the preview mode. | public void | toolbarClicked(String comp) |
actionPerformed | public void actionPerformed(ActionEvent e)(Code) | | Respond to events such as menu selections
Parameters: e - |
addTarget | public void addTarget(String name, Object constraint, int preferredWidth, int preferredHeight)(Code) | | Add a new frame to a frameset
Parameters: name - the frame name Parameters: constraint - the BorderlayoutConstraint Parameters: preferredWidth - the preferred width Parameters: preferredHeight - the preferred height |
addTarget | public void addTarget(XTarget frame, Object constraint)(Code) | | Adds a frame to the frameset
Parameters: frame - the new traget frame |
alignSelectedComponents | public void alignSelectedComponents(int command)(Code) | | Change the component alignment
Parameters: command - the menu id used to invoke the option |
clearSelectedComponents | public void clearSelectedComponents()(Code) | | |
componentSized | public void componentSized()(Code) | | Update the state to reflect changes to the components
|
copy | public void copy()(Code) | | Add all of the selected components to the componentClipboard Vector.
|
cut | public void cut()(Code) | | Call copy which adds all of the selected components to the componentClipboard
Vector. Then remove the selected components to the pageHolder.
|
deleteSelection | public void deleteSelection()(Code) | | Delete the selected items
|
displayPage | public XPage displayPage(XPage page)(Code) | | Called when a page has been added with the XPageManager
Parameters: page - The XPage which has been loaded. |
displayPage | public XPage displayPage(XPage page, String target)(Code) | | Called when a page has been added with the XPageManager
Parameters: page - The XPage which has been loaded. |
findPageResource | public XPageResource findPageResource(String screenName)(Code) | | Finds the target for a page
Parameters: screenName - the screen to locate the container holding the named page |
findTarget | protected Container findTarget(Container container, String target)(Code) | | Finds the target for a page display request
Parameters: container - the root container Parameters: target - the target area the container to be updated |
findTarget | public Container findTarget(String target)(Code) | | Finds the target for a page display request
Parameters: target - the target area the container to be updated |
getContentPage | public XPageResource getContentPage()(Code) | | Get the name of the page in the content panel
the content page name |
getCurrentPage | public XPageResource getCurrentPage()(Code) | | Get the current page
the page instance |
getNumTargets | public int getNumTargets()(Code) | | Get the number of targets in the container
|
getTarget | public Container getTarget(int idx)(Code) | | Get the target for a page display request
Parameters: idx - the target area the container to be updated |
hasFrames | public boolean hasFrames()(Code) | | |
hasGuides | public boolean hasGuides()(Code) | | |
hasPageBorders | public boolean hasPageBorders()(Code) | | |
hasPasteContent | public boolean hasPasteContent()(Code) | | Check that there are items to paste
true if there are items to paste |
isAddingComponent | public boolean isAddingComponent()(Code) | | |
loadFrames | public void loadFrames(boolean showFrames)(Code) | | Load a frameset
Parameters: showFrames - true to show the frames |
loadPage | public XPageResource loadPage(String pageName, String target, int pageWidth, int pageHeight)(Code) | | Load a page into the named area
Parameters: pageName - the page name Parameters: target - the name of the target area Parameters: pageWidth - the page width Parameters: pageHeight - the page height |
paste | public void paste()(Code) | | first check that the componentClipboard is not null and then effectively clone
each component found in it. This is done by creating the basic component using
the styleFactory. This creates the new component with the basic properties
after which the component helper is called to set component specific properties.
Add the keyListener and mouseListener for selecting and moving the new component.
|
projectUpdated | public void projectUpdated()(Code) | | The project has been updated
|
removeEventListeners | protected void removeEventListeners(XPageResource pageResource, XEditorEventHandler handler, Container cont)(Code) | | Adds the event handlers. Events are specified in the XML as having 'type'
(e.g. MouseHandler, ActionHandler etc...), 'name' (the method name to be
invoked) and 'target' (the name of the component to which the handler is
attached) attributes
Parameters: page - The page that contains the response methods Parameters: pageResource - the object holding the event names |
resetListeners | void resetListeners()(Code) | | Reset the page listeners after a build
|
resetStyles | public void resetStyles()(Code) | | |
selectComponent | public void selectComponent(Component selection, boolean init)(Code) | | |
setEventListeners | protected void setEventListeners(XPage page, XPageResource pageResource, Container cont)(Code) | | Adds the event handlers. Events are specified in the XML as having 'type'
(e.g. MouseHandler, ActionHandler etc...), 'name' (the method name to be
invoked) and 'target' (the name of the component to which the handler is
attached) attributes
Parameters: page - The page that contains the response methods Parameters: pageResource - the object holding the event names |
showGuides | public void showGuides(boolean showGuides)(Code) | | |
showLaf | public void showLaf(boolean showSystemLaf)(Code) | | Use the system look and feel.
Parameters: showSystemLaf - true to use the system look and feel, otherwise use the Java look and feel |
showPages | public void showPages(boolean showPages)(Code) | | |
sizeGuidePane | void sizeGuidePane()(Code) | | Change the size of the guide pane to match that of this window
|
togglePreview | protected void togglePreview()(Code) | | Toggle the preview mode. In preview mode the application can be executed whereas
in Edit mode the application can be modified.
|
|
|