| org.netbeans.modules.visualweb.propertyeditors.PropertyEditorBase org.netbeans.modules.visualweb.propertyeditors.UrlPropertyEditor
All known Subclasses: org.netbeans.modules.visualweb.web.ui.dt.component.propertyeditors.SunWebUrlPropertyEditor, org.netbeans.modules.visualweb.propertyeditors.ImageUrlPropertyEditor,
UrlPropertyEditor | public class UrlPropertyEditor extends PropertyEditorBase implements com.sun.rave.propertyeditors.UrlPropertyEditor(Code) | | An editor for string properties that represent URLs. URLs may be typed directly
in-line, or created in a custom editor (see
UrlPropertyPanel ). Note
that URLs should be either absolute (beginning with a protocol) or
context-relative (beginning with "/"). Characters not allowed in URLs are
converted to escape sequences when the URL property value is saved.
A custom editor is also supplied, which presents a tree of project resources
to which links may be made. These links are created as context-relative URLs.
The custom editor may be configured by overriding a number of property editor
methods:
- To provide support for components that render URL anchors within a page.
If
isTargetComponent() returns true for a component, the custom
editor will show the component as a target node within its containing page
node. If selected, it results in a URL with # plus whatever is
returned by getTargetComponentName() added at the end.
- To limit the types of files that may be selected. By default, the method
getFileFilter() returns null, which results in all files being
selectable as URL targets. If a file filter is returned, it will be used to
determine which files are shown. There is a convenience method for creating
file filters, createFileFilter(String,String) .
author: gjmurphy |
decodeUrl | public static String decodeUrl(String url)(Code) | | Convert a URL to a file system path by intrepreting all two-character
sequences of the form %xx as a hexadecimal character
reference in UTF8.
|
getFileFilter | public UrlFileFilter getFileFilter()(Code) | | Returns a file filter to use in determining which files are suitable for
selection by this URL editor. By default, returns null, to indicate that
all files are suitable.
|
getTargetComponentName | public String getTargetComponentName(UIComponent component)(Code) | | Returns the value of the name attribute that the generated
HTML URL anchor will have. By default, returns the value of the component's
id property. This method is intended to be overriden by
implementing classes.
|
isEditableAsText | public boolean isEditableAsText()(Code) | | |
isTargetComponent | public boolean isTargetComponent(UIComponent component)(Code) | | Returns true if the component specified will generate an HTML URL anchor
when rendered. By default, returns false . This method shoud
be overriden by implementing classes.
|
supportsCustomEditor | public boolean supportsCustomEditor()(Code) | | |
|
|