public final class ProxySettingsPanel extends DefaultTraversablePanel implements ApplyListener
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Constructor and Description |
---|
ProxySettingsPanel() |
ProxySettingsPanel(boolean suppressUseProxy) |
Modifier and Type | Method and Description |
---|---|
void |
apply(ApplyEvent e)
This method is called when the changes made in the
NavigableUIContainer are to be committed to the original
data structures. |
void |
cancel(ApplyEvent e)
This method is called when the changes made in the
NavigableUIContainer are to be discarded. |
java.lang.String |
getAutoConfigScript()
Get the automatic configuration script.
|
java.lang.String |
getExceptions()
Get exceptions.
|
java.lang.String |
getHost()
Get the proxy host.
|
char[] |
getPassword()
Get the proxy password.
|
java.lang.String |
getPort()
Get the proxy port.
|
ProxyOptions |
getProxyOptions()
Convenience method that constructs and returns a new instance of a
proxy options object containing the settings configured in this panel.
|
ProxyOptions.ProxyType |
getProxyType()
Get which type of a proxy is to be used.
|
boolean[] |
getUseProxyAndUseSystemDefaultProxy()
Deprecated.
Use getProxyType()
|
boolean |
getUseProxyAuthentication()
Get whether proxy authentication is to be used.
|
java.lang.String |
getUserName()
Get the proxy user name.
|
void |
onEntry(TraversableContext tc)
Does nothing by default.
|
void |
onExit(TraversableContext tc)
Does nothing by default.
|
void |
setAutoConfigScript(java.lang.String autoConfigScript)
Get the automatic configuration script.
|
void |
setExceptions(java.lang.String exceptions)
Set the exceptions.
|
void |
setHost(java.lang.String host)
Set the proxy host displayed in the ui.
|
void |
setPassword(char[] password)
Set the proxy password.
|
void |
setPort(java.lang.String port)
Set the proxy port displayed in the ui.
|
void |
setProxyOptions(ProxyOptions proxyOptions)
Convenience method to initialize the UI from a ProxyOptions object.
|
void |
setProxyType(ProxyOptions.ProxyType proxyType)
Set radio button based on the current proxy type setting.
|
void |
setScript(java.lang.String script)
Set the automatic configuration script in the ui.
|
void |
setUseProxyAuthentication(boolean useProxyAuthentication)
Set whether to use proxy authentication.
|
void |
setUserName(java.lang.String userName)
Set the proxy user name displayed in the ui.
|
void |
updateProxyAuthFields() |
gbc, gbc, getComponent, getDefaultTitle, getExitTransition, getHelpID, getText, setDefaultTitle, setHelpID
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
public ProxySettingsPanel()
public ProxySettingsPanel(boolean suppressUseProxy)
public void setScript(java.lang.String script)
script
- the automatic configuration script.public void setHost(java.lang.String host)
host
- the proxy host name.public void setPort(java.lang.String port)
port
- the proxy port.public void setExceptions(java.lang.String exceptions)
exceptions
- exceptions for the proxy.public void setProxyType(ProxyOptions.ProxyType proxyType)
proxyType
- proxy type currently selectedpublic void setUseProxyAuthentication(boolean useProxyAuthentication)
useProxyAuthentication
- if true, proxy authentication is used.public void setUserName(java.lang.String userName)
userName
- the proxy user name.public void setPassword(char[] password)
password
- the proxy password.public void setAutoConfigScript(java.lang.String autoConfigScript)
public java.lang.String getHost()
public java.lang.String getPort()
public java.lang.String getExceptions()
public ProxyOptions.ProxyType getProxyType()
@Deprecated public boolean[] getUseProxyAndUseSystemDefaultProxy()
public boolean getUseProxyAuthentication()
public java.lang.String getUserName()
public char[] getPassword()
public java.lang.String getAutoConfigScript()
public void setProxyOptions(ProxyOptions proxyOptions)
proxyOptions
- a proxy options object.public ProxyOptions getProxyOptions()
public void updateProxyAuthFields()
public void onEntry(TraversableContext tc)
DefaultTraversablePanel
onEntry
in interface Traversable
onEntry
in class DefaultTraversablePanel
tc
- The data wrapper where the
Traversable
locates the data that it needs to
populate the UI.Traversable.onEntry(TraversableContext)
public void onExit(TraversableContext tc) throws TraversalException
DefaultTraversablePanel
onExit
in interface Traversable
onExit
in class DefaultTraversablePanel
tc
- The data object where changes made in the UI
should be copied so that the changes can be accessed by other
Traversable
s.TraversalException
- if the user has entered either
incomplete, invalid, or inconsistent data. This exception
prevents the property dialog or wizard from continuing and
forces the user to stay on the current Traversable
until the data entered is valid or the user cancels. The
exception class itself is capable of carrying an error message
that will be shown to the user. Refer to its javadoc for details.Traversable.onExit(TraversableContext)
public void apply(ApplyEvent e)
ApplyListener
NavigableUIContainer
are to be committed to the original
data structures. This normally occurs when the user pushes the
"OK", "Apply", or "Finish" button.
This method is called as soon as the user's action is recognized.
Typically, if the NavigableUIContainer
is editing a copy
of the original data, there will be an ApplyListener
registered that is responsible for flushing the changes from the
edited data copy back to the original data structure. The API in
the oracle.ide.panels
package does not specify when
such an ApplyListener
is registered or whether one
is registered at all.
If you are writing code that must depend on the registration order
of such an ApplyListener
, you will need to consult
the documentation for the code that instantiates the
NavigableUIContainer
to determine if the registration
order for ApplyListener
s is specified there.
apply
in interface ApplyListener
e
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.public void cancel(ApplyEvent e)
ApplyListener
NavigableUIContainer
are to be discarded. This normally
occurs when the user pushes the "Cancel" button.
No data validation occurs when the user cancels, and the
NavigableUIContainer
may or may not call the onExit
method of the
currently showing Traversable
. In general,
onExit
will not be called.
cancel
in interface ApplyListener
e
- The ApplyEvent
that provides contextual
information about when the ApplyEvent
was fired.