| org.netbeans.jellytools.TopComponentOperator org.netbeans.jellytools.modules.form.FormDesignerOperator
FormDesignerOperator | public class FormDesignerOperator extends TopComponentOperator (Code) | | Handle editing of forms in IDE. It enables to design components and also
modify source code.
Usage:
FormDesignerOperator designer = new FormDesignerOperator("MyForm");
ComponentPaletteOperator palette = new ComponentPaletteOperator();
ComponentInspectorOperator inspector = new ComponentInspectorOperator();
//add first panel
palette.expandSwing();
palette.selectComponent("JPanel");
designer.clickOnComponent(designer.fakePane().getSource());
//set layout to north
inspector.selectComponent("JFrame|jPanel1"); // NOI18N
new Property(inspector.properties(), "Direction").setValue("North"); // NOI18N
//find panel
Component firstPanel = designer.findComponent(JPanel.class);
//add something there
palette.expandSwing();
palette.selectComponent("JLabel"); // NOI18N
designer.clickOnComponent(firstPanel);
// get editor and do editing
EditorOperator editor = designer.editor();
editor.insert("my code", 23, 1);
See Also: ComponentInspectorOperator See Also: ComponentPaletteOperator author: Jiri.Skrivanek@sun.com |
Inner Class :final public static class FormDesignerSubchooser implements ComponentChooser | |
FormDesignerOperator | public FormDesignerOperator(String name)(Code) | | Waits for the form Designer appearence and creates operator for it.
It is activated by defalt.
Parameters: name - name of form designer |
FormDesignerOperator | public FormDesignerOperator(String name, int index)(Code) | | Waits for the form Designer appearence and creates operator for it.
It is activated by defalt.
Parameters: name - name of form designer Parameters: index - wait for index-th form designer |
btPreviewForm | public JButtonOperator btPreviewForm()(Code) | | Getter for the "Preview Form" button.
JButtonOperator instance |
clickOnComponent | public void clickOnComponent(Component subComponent, Point localCoords)(Code) | | Clicks on component. Events are really sent to handleLayer()
Parameters: subComponent - Component in designer. Parameters: localCoords - Local subComponent 's coordinates See Also: FormDesignerOperator.handleLayer() |
connectionMode | public void connectionMode()(Code) | | Switches to the connection mode.
|
design | public void design()(Code) | | Switches to the form designer. It pushes Design toggle button if we
are not in form designer already.
|
editor | public EditorOperator editor()(Code) | | Clicks Source button and returns EditorOperator to handle form source
code.
EditorOperator instance |
fakePane | public ContainerOperator fakePane()(Code) | | Returns ContainerOperator for component which represents designing form
(like JFrame, JDialog, ...).
ContainerOperator for fake pane |
findComponent | public Component findComponent(ComponentChooser chooser, int index)(Code) | | Searches a component inside fakePane().
See Also: FormDesignerOperator.fakePane() Parameters: chooser - chooser specifying criteria to find a component Parameters: index - index of component index-th component from fake pane matching chooser's criteria |
findComponent | public Component findComponent(ComponentChooser chooser)(Code) | | Searches a component inside fakePane().
See Also: FormDesignerOperator.fakePane() Parameters: chooser - chooser specifying criteria to find a component component from fake pane matching chooser's criteria |
findComponent | public Component findComponent(Class clzz, int index)(Code) | | Searches index 's instance of a clzz class inside fakePane().
See Also: FormDesignerOperator.fakePane() Parameters: clzz - class of component to be find (e.g. JButton.class ) Parameters: index - index of component index-th component from fake pane of the given class |
findComponent | public Component findComponent(Class clzz)(Code) | | Searches first instance of a clzz class inside fakePane().
See Also: FormDesignerOperator.fakePane() Parameters: clzz - class of component to be find (e.g. JButton.class ) first component from fake pane of the given class |
previewForm | public JFrameOperator previewForm(String frameName)(Code) | | Pushes "Preview Form" button and waits for a frame opened.
Parameters: frameName - Frame class name. JFrameOperator instance of "Form Preview" window |
previewForm | public JFrameOperator previewForm()(Code) | | Pushes "Preview Form" button and waits for a frame opened.
JFrameOperator instance of "Form Preview" window |
selectionMode | public void selectionMode()(Code) | | Switches to the selection mode.
|
source | public void source()(Code) | | Switches to the source editor. It pushes Source toggle button if we
are not in source editor already.
|
tbConnectionMode | public JToggleButtonOperator tbConnectionMode()(Code) | | Getter for the "Connection Mode" toggle button.
JToggleButtonOperator instance |
tbDesign | public JToggleButtonOperator tbDesign()(Code) | | Returns JToggleButtonOperator instance of Design button
JToggleButtonOperator instance |
tbSelectionMode | public JToggleButtonOperator tbSelectionMode()(Code) | | Getter for the "Selection Mode" toggle button.
JToggleButtonOperator instance |
tbSource | public JToggleButtonOperator tbSource()(Code) | | Returns JToggleButtonOperator instance of Source button
JToggleButtonOperator instance |
verify | public void verify()(Code) | | Performs verification by accessing all sub-components
|
Methods inherited from org.netbeans.jellytools.TopComponentOperator | public void attachTo(String targetTopComponentName, String side)(Code)(Java Doc) public void attachTo(TopComponentOperator targetTopComponentOperator, String side)(Code)(Java Doc) public void cloneDocument()(Code)(Java Doc) public void close()(Code)(Java Doc) public void closeAllDocuments()(Code)(Java Doc) public void closeDiscard()(Code)(Java Doc) public void closeWindow()(Code)(Java Doc) protected TopComponentOperator findParentTopComponent()(Code)(Java Doc) public static JComponent findTopComponent(String name, int index)(Code)(Java Doc) protected static JComponent findTopComponent(ContainerOperator cont, String name, int index, ComponentChooser subchooser)(Code)(Java Doc) public boolean isModified()(Code)(Java Doc) protected boolean isOpened()(Code)(Java Doc) public void makeComponentVisible()(Code)(Java Doc) public void maximize()(Code)(Java Doc) public void pushMenuOnTab(String popupPath)(Code)(Java Doc) public void restore()(Code)(Java Doc) public void save()(Code)(Java Doc) public void saveDocument()(Code)(Java Doc) public void setUnmodified()(Code)(Java Doc) public void waitClosed()(Code)(Java Doc) protected static JComponent waitTopComponent(String name, int index)(Code)(Java Doc) protected static JComponent waitTopComponent(ContainerOperator cont, String name, int index, ComponentChooser subchooser)(Code)(Java Doc)
|
|
|