| java.lang.Object org.netbeans.modules.visualweb.designer.WebForm
WebForm | public class WebForm implements Designer(Code) | | Holds web-form related state.
author: Peter Zavadsky author: Tor Norbye (the original code) |
Inner Class :public static class DefaultDesignerEvent implements DesignerEvent | |
Method Summary | |
public void | addDesignerListener(DesignerListener l) | public int | adjustX(int x) Adjust the given mouse X position to account for insets in parent
components etc., such that the resulting position matches the canvas
pixel in the view the mouse is over. | public int | adjustY(int y) Adjust the given mouse X position to account for insets in parent
components etc., such that the resulting position matches the canvas
pixel in the view the mouse is over. | boolean | canDropComponentsAtNode(Element[] componentRootElements, Node node) | boolean | canHighlightComponentRootElement(Element componentRootElement) | boolean | canImport(JComponent comp, DataFlavor[] transferFlavors, Transferable transferable) | public void | changeNode(Node rendered, Node parent, Element[] changedElements) | public void | clearDropMatch() | public void | clearSelection(boolean update) | public int | compareBoundaryPoints(Node endPointA, int offsetA, Node endPointB, int offsetB) | int | computeActions(Element dropeeComponentRootElement, Transferable transferable) | public DomPosition | computeNextPosition(DomPosition pos) | public DomPosition | computePreviousPosition(DomPosition pos) | public void | copyBoxForElement(Element fromElement, Element toElement) | public DomPosition | createDomPosition(Node node, int offset, Bias bias) | public DomPosition | createDomPosition(Node node, boolean after) | public DomRange | createDomRange(Node dotNode, int dotOffset, Node markNode, int markOffset) | InlineEditorSupport | createInlineEditorSupport(Element componentRootElement, String propertyName, String xpath) | public JComponent | createPaneComponent() | public Designer.RenderContext | createRenderContext() | public static WebForm | createWebForm(DomProvider domProvider) | public void | detachDomDocument() | public Box | findBox(int x, int y) | public Box | findBoxForComponentRootElement(Element componentRootElement) | public Box | findBoxForElement(Element element) | public Box | findBoxForSourceElement(Element sourceElement) | public CssBox | findCssBoxForElement(Element element) Locate the box that was created for the given element,
if any. | public WebForm | findExternalForm(URL url) | public void | finishInlineEditing(boolean cancel) | public void | fireSelectionChanged(DesignerEvent evt) | public void | fireUserActionPerformed(DesignerEvent evt) | public void | fireUserElementClicked(DesignerClickEvent evt) | public void | fireUserPopupActionPerformed(DesignerPopupEvent evt) | DomPosition | first(DomPosition dot, DomPosition mark) | public URL | getBaseUrl() | public ColorManager | getColors() | Element | getComponentRootElementEquivalentTo(Element oldComponentRootElement) | public static Element | getComponentRootElementForCssBox(CssBox cssBox) XXX #113773 Find component root element for specified box. | public CssBox | getCssBoxForElement(Element element) | public Decoration | getDecoration(Element element) | public int | getDefaultFontSize() | public DomDocument | getDomDocument() Gets the DomDocument associated with this webform. | public DomProvider | getDomProvider() | public DomProviderService | getDomProviderService() | int | getDropType(Element origDropeeComponentRootElement, Element droppeeElement, Transferable t, boolean linkOnly) | int | getDropTypeForComponent(Element origDropeeComponentRootElement, Element droppeeElement, Element componentRootElement, boolean linkOnly) | public static Element | getElementForComponentRootCssBox(CssBox cssBox) XXX This will replace the JSF specific above methods.
Gets associated element for the css box. | public DomProvider[] | getExternalDomProviders() | public int | getGridHeight() | public int | getGridTraceHeight() | public int | getGridTraceWidth() | public int | getGridWidth() | public Element | getHtmlBody() | public org.w3c.dom.Document | getHtmlDom() | public ImageCache | getImageCache() | public CssBox | getInitialFocusMarkCssBox() | public InteractionManager | getManager() Return the interaction manager which is responsible for
coordinating mouse and keyboard gestures with designer modes
and actions. | public Box | getPageBox() | public int | getPageSizeHeight() | public int | getPageSizeWidth() | public PaletteController | getPaletteController() | public DesignerPane | getPane() | public ActionMap | getPaneActionMap() | public DomRange | getPaneCaretRange() | public Point | getPastePoint() | public Element | getPrimarySelectedComponent() | public Element | getPrimarySelection() | public CellRendererPane | getRenderPane() Return a cell renderer pane suitable for use with the designer.
Used to stamp out combo boxes etc. | public Element[] | getSelectedComponents() | public Element | getSelectedContainer() | public int | getSelectedCount() | public SelectionManager | getSelection() | public boolean | hasCachedFrameBoxes() | public boolean | hasPaneCaret() | public boolean | hasSelection() | boolean | importData(JComponent comp, Transferable t, Point canvasPos, Node documentPosNode, int documentPosOffset, Dimension dimension, boolean isGrid, Element droppeeElement, Element dropeeComponentRootElement, int dropAction) | void | importString(String string, Point canvasPos, Node documentPosNode, int documentPosOffset, Dimension dimension, boolean isGrid, Element droppeeElement, Element dropeeComponentRootElement) | public Transferable | inlineCopyText(boolean isCut) | public void | inlineEditComponents(Element[] componentRootElements) | public void | insertNode(Node rendered, Node parent) | public void | invokeDeleteNextCharAction(ActionEvent evt) | public boolean | isFormComponent(Element componentRootElement) | public boolean | isGridMode() | public boolean | isGridShow() | public boolean | isGridSnap() | public boolean | isInlineEditing() | public boolean | isInsideEditableRegion(DomPosition pos) Return true iff the position is within the editable portion of the document. | public boolean | isPaintSizeMask() | public boolean | isRenderedNode(Node node) | public boolean | isShowDecorations() | DomPosition | last(DomPosition dot, DomPosition mark) | public Rectangle | modelToView(DomPosition pos) Converts the given location in the model to a place in
the view coordinate system. | public boolean | moveComponent(Element componentRootElement, Node parentNode, Node before) | void | paintDesignerDecorations(Graphics2D g) | public void | paneRequestFocus() | int | processLinks(Element origElement, Element componentRootElement) | public void | redoPaneLayout(boolean immediate) | public void | removeDesignerListener(DesignerListener l) | public void | removeNode(Node previouslyRendered, Node parent) | public void | resetAll() | public void | resetPanePageBox() | public URL | resolveUrl(String urlString) | public void | selectComponent(Element componentRootElement) | public void | selectComponentDelayed(Element componentRootElement) | public void | setCssBoxForElement(Element element, CssBox box) | public void | setDefaultFontSize(int defaultFontSize) | public void | setGridHeight(int gridHeight) | public void | setGridShow(boolean gridShow) | public void | setGridSnap(boolean gridSnap) | public void | setGridTraceHeight(int gridTraceHeight) | public void | setGridTraceWidth(int gridTraceWidth) | public void | setGridWidth(int gridWidth) | public void | setInitialFocusMarkCssBox(CssBox cssBox) | public void | setPageSize(Dimension pageSize) | public void | setPaintSizeMask(boolean paintSizeMask) | public void | setPaneCaret(DomPosition pos) | public void | setPaneGrid(boolean gridMode) | public void | setSelectedComponents(Element[] componentRootElements, boolean update) | public void | setShowDecorations(boolean showDecorations) | public void | showDropMatch(Element componentRootElement, Element regionElement, int dropType) | public int | snapX(int x, Box parent) Snap the given X position. | public int | snapX(int x) | public int | snapY(int y, Box parent) Snap the given Y position. | public int | snapY(int y) | public void | startInlineEditing(Element componentRootElement, String propertyName) | public void | syncSelection(boolean update) | public String | toString() | public void | updatePaneViewPort() | public void | updateSelectedNodes() | public DomPosition | viewToModel(Point pt) Converts the given place in the view coordinate system
to the nearest representative location in the model.
The component must have a non-zero positive size for
this translation to be computed.
Parameters: tc - the text component for which this UI is installed Parameters: pt - the location in the view to translate. |
addDesignerListener | public void addDesignerListener(DesignerListener l)(Code) | | |
adjustX | public int adjustX(int x)(Code) | | Adjust the given mouse X position to account for insets in parent
components etc., such that the resulting position matches the canvas
pixel in the view the mouse is over.
|
adjustY | public int adjustY(int y)(Code) | | Adjust the given mouse X position to account for insets in parent
components etc., such that the resulting position matches the canvas
pixel in the view the mouse is over.
|
canDropComponentsAtNode | boolean canDropComponentsAtNode(Element[] componentRootElements, Node node)(Code) | | |
canHighlightComponentRootElement | boolean canHighlightComponentRootElement(Element componentRootElement)(Code) | | |
clearDropMatch | public void clearDropMatch()(Code) | | |
clearSelection | public void clearSelection(boolean update)(Code) | | |
compareBoundaryPoints | public int compareBoundaryPoints(Node endPointA, int offsetA, Node endPointB, int offsetB)(Code) | | |
computeNextPosition | public DomPosition computeNextPosition(DomPosition pos)(Code) | | |
computePreviousPosition | public DomPosition computePreviousPosition(DomPosition pos)(Code) | | |
createDomPosition | public DomPosition createDomPosition(Node node, int offset, Bias bias)(Code) | | |
createDomPosition | public DomPosition createDomPosition(Node node, boolean after)(Code) | | |
createDomRange | public DomRange createDomRange(Node dotNode, int dotOffset, Node markNode, int markOffset)(Code) | | |
createInlineEditorSupport | InlineEditorSupport createInlineEditorSupport(Element componentRootElement, String propertyName, String xpath)(Code) | | |
detachDomDocument | public void detachDomDocument()(Code) | | |
findBox | public Box findBox(int x, int y)(Code) | | |
findBoxForComponentRootElement | public Box findBoxForComponentRootElement(Element componentRootElement)(Code) | | |
findBoxForElement | public Box findBoxForElement(Element element)(Code) | | |
findBoxForSourceElement | public Box findBoxForSourceElement(Element sourceElement)(Code) | | |
findCssBoxForElement | public CssBox findCssBoxForElement(Element element)(Code) | | Locate the box that was created for the given element,
if any. May return null if the element has not been
rendered.
|
finishInlineEditing | public void finishInlineEditing(boolean cancel)(Code) | | |
fireSelectionChanged | public void fireSelectionChanged(DesignerEvent evt)(Code) | | |
fireUserActionPerformed | public void fireUserActionPerformed(DesignerEvent evt)(Code) | | |
fireUserElementClicked | public void fireUserElementClicked(DesignerClickEvent evt)(Code) | | |
fireUserPopupActionPerformed | public void fireUserPopupActionPerformed(DesignerPopupEvent evt)(Code) | | |
first | DomPosition first(DomPosition dot, DomPosition mark)(Code) | | |
getColors | public ColorManager getColors()(Code) | | Return the color manager for the webform which stores
color preferences and determines suitable colors for
glyphs and nibs painted on top of the webform
|
getComponentRootElementEquivalentTo | Element getComponentRootElementEquivalentTo(Element oldComponentRootElement)(Code) | | |
getComponentRootElementForCssBox | public static Element getComponentRootElementForCssBox(CssBox cssBox)(Code) | | XXX #113773 Find component root element for specified box.
|
getDefaultFontSize | public int getDefaultFontSize()(Code) | | |
getDomDocument | public DomDocument getDomDocument()(Code) | | Gets the DomDocument associated with this webform.
|
getDropTypeForComponent | int getDropTypeForComponent(Element origDropeeComponentRootElement, Element droppeeElement, Element componentRootElement, boolean linkOnly)(Code) | | |
getElementForComponentRootCssBox | public static Element getElementForComponentRootCssBox(CssBox cssBox)(Code) | | XXX This will replace the JSF specific above methods.
Gets associated element for the css box. It returns the element only if the specified box
represents component top level element except lines, texts and spaces.
|
getGridHeight | public int getGridHeight()(Code) | | |
getGridTraceHeight | public int getGridTraceHeight()(Code) | | |
getGridTraceWidth | public int getGridTraceWidth()(Code) | | |
getGridWidth | public int getGridWidth()(Code) | | |
getHtmlBody | public Element getHtmlBody()(Code) | | Return the <body> element associated with the rendered HTML
document
|
getImageCache | public ImageCache getImageCache()(Code) | | Return a cache of images for this document
|
getInitialFocusMarkCssBox | public CssBox getInitialFocusMarkCssBox()(Code) | | |
getManager | public InteractionManager getManager()(Code) | | Return the interaction manager which is responsible for
coordinating mouse and keyboard gestures with designer modes
and actions.
|
getPageBox | public Box getPageBox()(Code) | | |
getPageSizeHeight | public int getPageSizeHeight()(Code) | | |
getPageSizeWidth | public int getPageSizeWidth()(Code) | | |
getPaletteController | public PaletteController getPaletteController()(Code) | | |
getPaneCaretRange | public DomRange getPaneCaretRange()(Code) | | |
getPrimarySelectedComponent | public Element getPrimarySelectedComponent()(Code) | | |
getRenderPane | public CellRendererPane getRenderPane()(Code) | | Return a cell renderer pane suitable for use with the designer.
Used to stamp out combo boxes etc. into offscreen buffers, since
they refuse to paint themselves properly if they are not parented
to a heavyweight component (e.g. JFrame). The CellRendererPane prevents
additions/removals from causing unnecessary traffic and recomputations
in other components.
|
getSelectedComponents | public Element[] getSelectedComponents()(Code) | | |
getSelectedCount | public int getSelectedCount()(Code) | | |
hasCachedFrameBoxes | public boolean hasCachedFrameBoxes()(Code) | | Return true iff the document has cached frame boxes
|
hasPaneCaret | public boolean hasPaneCaret()(Code) | | |
hasSelection | public boolean hasSelection()(Code) | | |
inlineEditComponents | public void inlineEditComponents(Element[] componentRootElements)(Code) | | |
invokeDeleteNextCharAction | public void invokeDeleteNextCharAction(ActionEvent evt)(Code) | | |
isFormComponent | public boolean isFormComponent(Element componentRootElement)(Code) | | |
isGridMode | public boolean isGridMode()(Code) | | Return whether or not grid mode is in effect
|
isGridShow | public boolean isGridShow()(Code) | | |
isGridSnap | public boolean isGridSnap()(Code) | | |
isInlineEditing | public boolean isInlineEditing()(Code) | | |
isInsideEditableRegion | public boolean isInsideEditableRegion(DomPosition pos)(Code) | | Return true iff the position is within the editable portion of the document.
|
isPaintSizeMask | public boolean isPaintSizeMask()(Code) | | |
isRenderedNode | public boolean isRenderedNode(Node node)(Code) | | |
isShowDecorations | public boolean isShowDecorations()(Code) | | |
last | DomPosition last(DomPosition dot, DomPosition mark)(Code) | | |
modelToView | public Rectangle modelToView(DomPosition pos)(Code) | | Converts the given location in the model to a place in
the view coordinate system.
The component must have a non-zero positive size for
this translation to be computed.
Parameters: tc - the text component for which this UI is installed Parameters: pos - the local location in the model to translate >= 0 the coordinates as a rectangle, null if the model is not painted exception: BadLocationException - if the given position does notrepresent a valid location in the associated document See Also: DesignerPaneBaseUI.modelToView |
moveComponent | public boolean moveComponent(Element componentRootElement, Node parentNode, Node before)(Code) | | |
paneRequestFocus | public void paneRequestFocus()(Code) | | |
redoPaneLayout | public void redoPaneLayout(boolean immediate)(Code) | | |
removeDesignerListener | public void removeDesignerListener(DesignerListener l)(Code) | | |
removeNode | public void removeNode(Node previouslyRendered, Node parent)(Code) | | |
resetAll | public void resetAll()(Code) | | |
resetPanePageBox | public void resetPanePageBox()(Code) | | |
selectComponent | public void selectComponent(Element componentRootElement)(Code) | | |
selectComponentDelayed | public void selectComponentDelayed(Element componentRootElement)(Code) | | |
setDefaultFontSize | public void setDefaultFontSize(int defaultFontSize)(Code) | | |
setGridHeight | public void setGridHeight(int gridHeight)(Code) | | |
setGridShow | public void setGridShow(boolean gridShow)(Code) | | |
setGridSnap | public void setGridSnap(boolean gridSnap)(Code) | | |
setGridTraceHeight | public void setGridTraceHeight(int gridTraceHeight)(Code) | | |
setGridTraceWidth | public void setGridTraceWidth(int gridTraceWidth)(Code) | | |
setGridWidth | public void setGridWidth(int gridWidth)(Code) | | |
setInitialFocusMarkCssBox | public void setInitialFocusMarkCssBox(CssBox cssBox)(Code) | | |
setPaintSizeMask | public void setPaintSizeMask(boolean paintSizeMask)(Code) | | |
setPaneCaret | public void setPaneCaret(DomPosition pos)(Code) | | |
setPaneGrid | public void setPaneGrid(boolean gridMode)(Code) | | |
setSelectedComponents | public void setSelectedComponents(Element[] componentRootElements, boolean update)(Code) | | |
setShowDecorations | public void setShowDecorations(boolean showDecorations)(Code) | | |
showDropMatch | public void showDropMatch(Element componentRootElement, Element regionElement, int dropType)(Code) | | |
snapX | public int snapX(int x, Box parent)(Code) | | Snap the given X position. If snap to grid is turned off, it simply
returns the original position.
Parameters: x - The horizontal position to be snapped to the grid Parameters: parent - A positioning parent to snap to, or null to usethe default viewport (0,0) |
snapX | public int snapX(int x)(Code) | | |
snapY | public int snapY(int y, Box parent)(Code) | | Snap the given Y position. If snap to grid is turned off, it simply
returns the original position.
Parameters: y - The vertical position to be snapped to the grid Parameters: parent - A positioning parent to snap to, or null to usethe default viewport (0,0) |
snapY | public int snapY(int y)(Code) | | |
startInlineEditing | public void startInlineEditing(Element componentRootElement, String propertyName)(Code) | | |
syncSelection | public void syncSelection(boolean update)(Code) | | |
updatePaneViewPort | public void updatePaneViewPort()(Code) | | |
updateSelectedNodes | public void updateSelectedNodes()(Code) | | |
viewToModel | public DomPosition viewToModel(Point pt)(Code) | | Converts the given place in the view coordinate system
to the nearest representative location in the model.
The component must have a non-zero positive size for
this translation to be computed.
Parameters: tc - the text component for which this UI is installed Parameters: pt - the location in the view to translate. Thisshould be in the same coordinate system as the mouse events. the offset from the start of the document >= 0,-1 if not painted See Also: DesignerPaneBaseUI.viewToModel |
|
|