APIdia Launch Partner
Top Description Inners Fields Constructors Methods
sun.swing

public final Class SwingAccessor

extends Object
Class Inheritance
Imports
java.awt.Component, .Point, java.lang.invoke.MethodHandles, javax.accessibility.Accessible, .AccessibleContext, javax.swing.*, javax.swing.text.JTextComponent

The SwingAccessor utility class. The main purpose of this class is to enable accessing private and package-private fields of classes from different classes/packages. See sun.misc.SharedSecretes for another example.

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface
SwingAccessor.AccessibleComponentAccessor

This interface provides access to the renderer's accessibility component.

public static interface
SwingAccessor.JComponentAccessor

An accessor for the JComponent class.

public static interface
SwingAccessor.JLightweightFrameAccessor

An accessor for the JLightweightFrame class.

public static interface
SwingAccessor.JTextComponentAccessor

An accessor for the JTextComponent class.

public static interface
public static interface
SwingAccessor.LAFStateAccessor

An accessor for the LAFState class state.

public static interface
SwingAccessor.PopupFactoryAccessor

An accessor for PopupFactory class.

public static interface
SwingAccessor.RepaintManagerAccessor

An accessor for the RepaintManager class.

public static interface
SwingAccessor.UIDefaultsAccessor

An accessor for the UIDefaults class.

Field Summary

Modifier and TypeField and Description
private static SwingAccessor.AccessibleComponentAccessor
private static SwingAccessor.JComponentAccessor
jComponentAccessor

The javax.swing.JComponent class accessor object.

private static SwingAccessor.JLightweightFrameAccessor
jLightweightFrameAccessor

The JLightweightFrame class accessor object

private static SwingAccessor.JTextComponentAccessor
jtextComponentAccessor

The javax.swing.text.JTextComponent class accessor object.

private static SwingAccessor.KeyStrokeAccessor
keyStrokeAccessor

The KeyStroke class accessor object.

private static SwingAccessor.LAFStateAccessor
private static SwingAccessor.PopupFactoryAccessor
popupFactoryAccessor

The PopupFactory class accessor object.

private static SwingAccessor.RepaintManagerAccessor
repaintManagerAccessor

The RepaintManager class accessor object.

private static ThreadLocal<Boolean>
private static SwingAccessor.UIDefaultsAccessor
uiDefaultsAccessor

The UIDefaults class accessor object

Constructor Summary

AccessConstructor and Description
private
SwingAccessor()

We don't need any objects of this class.

Method Summary

Modifier and TypeMethod and Description
private static void
public static SwingAccessor.AccessibleComponentAccessor
public static Boolean
public static SwingAccessor.JComponentAccessor
getJComponentAccessor()

Retrieve the accessor object for the javax.swing.JComponent class.

public static SwingAccessor.JLightweightFrameAccessor
getJLightweightFrameAccessor()

Retrieve the accessor object for the JLightweightFrame class

public static SwingAccessor.JTextComponentAccessor
getJTextComponentAccessor()

Retrieve the accessor object for the javax.swing.text.JTextComponent class.

public static SwingAccessor.KeyStrokeAccessor
getKeyStrokeAccessor()

Retrieve the accessor object for the KeyStroke class.

public static SwingAccessor.LAFStateAccessor
getLAFStateAccessor()

Retrieve the accessor object for the LAFState class.

public static SwingAccessor.PopupFactoryAccessor
getPopupFactoryAccessor()

Retrieve the accessor object for the PopupFactory class.

public static SwingAccessor.RepaintManagerAccessor
getRepaintManagerAccessor()

Retrieve the accessor object for the RepaintManager class.

public static SwingAccessor.UIDefaultsAccessor
getUIDefaultsAccessor()

Retrieve the accessor object for the JLightweightFrame class

public static void
public static void
public static void
setJComponentAccessor(SwingAccessor.JComponentAccessor jCompAccessor)

Set an accessor object for the javax.swing.JComponent class.

public static void
setJLightweightFrameAccessor(SwingAccessor.JLightweightFrameAccessor accessor)

Set an accessor object for the JLightweightFrame class.

public static void
setJTextComponentAccessor(SwingAccessor.JTextComponentAccessor jtca)

Set an accessor object for the javax.swing.text.JTextComponent class.

public static void
public static void
setLAFStateAccessor(SwingAccessor.LAFStateAccessor accessor)

Set an accessor object for the LAFState class.

public static void
setPopupFactoryAccessor(SwingAccessor.PopupFactoryAccessor popupFactoryAccessor)

Set an Accessor object for the PopupFactory class.

public static void
setRepaintManagerAccessor(SwingAccessor.RepaintManagerAccessor accessor)

Set an accessor object for the RepaintManager class.

public static void
setUIDefaultsAccessor(SwingAccessor.UIDefaultsAccessor accessor)

Set an accessor object for the UIDefaults class.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accessibleComponentAccessorback to summary
private static SwingAccessor.AccessibleComponentAccessor accessibleComponentAccessor
jComponentAccessorback to summary
private static SwingAccessor.JComponentAccessor jComponentAccessor

The javax.swing.JComponent class accessor object.

jLightweightFrameAccessorback to summary
private static SwingAccessor.JLightweightFrameAccessor jLightweightFrameAccessor

The JLightweightFrame class accessor object

jtextComponentAccessorback to summary
private static SwingAccessor.JTextComponentAccessor jtextComponentAccessor

The javax.swing.text.JTextComponent class accessor object.

keyStrokeAccessorback to summary
private static SwingAccessor.KeyStrokeAccessor keyStrokeAccessor

The KeyStroke class accessor object.

lafStateAccessorback to summary
private static SwingAccessor.LAFStateAccessor lafStateAccessor
popupFactoryAccessorback to summary
private static SwingAccessor.PopupFactoryAccessor popupFactoryAccessor

The PopupFactory class accessor object.

repaintManagerAccessorback to summary
private static SwingAccessor.RepaintManagerAccessor repaintManagerAccessor

The RepaintManager class accessor object.

tlObjback to summary
private static ThreadLocal<Boolean> tlObj
uiDefaultsAccessorback to summary
private static SwingAccessor.UIDefaultsAccessor uiDefaultsAccessor

The UIDefaults class accessor object

Constructor Detail

SwingAccessorback to summary
private SwingAccessor()

We don't need any objects of this class. It's rather a collection of static methods and interfaces.

Method Detail

ensureClassInitializedback to summary
private static void ensureClassInitialized(Class<?> c)
getAccessibleComponentAccessorback to summary
public static SwingAccessor.AccessibleComponentAccessor getAccessibleComponentAccessor()
getAllowHTMLObjectback to summary
public static Boolean getAllowHTMLObject()
getJComponentAccessorback to summary
public static SwingAccessor.JComponentAccessor getJComponentAccessor()

Retrieve the accessor object for the javax.swing.JComponent class.

getJLightweightFrameAccessorback to summary
public static SwingAccessor.JLightweightFrameAccessor getJLightweightFrameAccessor()

Retrieve the accessor object for the JLightweightFrame class

getJTextComponentAccessorback to summary
public static SwingAccessor.JTextComponentAccessor getJTextComponentAccessor()

Retrieve the accessor object for the javax.swing.text.JTextComponent class.

getKeyStrokeAccessorback to summary
public static SwingAccessor.KeyStrokeAccessor getKeyStrokeAccessor()

Retrieve the accessor object for the KeyStroke class.

getLAFStateAccessorback to summary
public static SwingAccessor.LAFStateAccessor getLAFStateAccessor()

Retrieve the accessor object for the LAFState class.

getPopupFactoryAccessorback to summary
public static SwingAccessor.PopupFactoryAccessor getPopupFactoryAccessor()

Retrieve the accessor object for the PopupFactory class.

getRepaintManagerAccessorback to summary
public static SwingAccessor.RepaintManagerAccessor getRepaintManagerAccessor()

Retrieve the accessor object for the RepaintManager class.

getUIDefaultsAccessorback to summary
public static SwingAccessor.UIDefaultsAccessor getUIDefaultsAccessor()

Retrieve the accessor object for the JLightweightFrame class

setAccessibleComponentAccessorback to summary
public static void setAccessibleComponentAccessor(final SwingAccessor.AccessibleComponentAccessor accessibleAccessor)
setAllowHTMLObjectback to summary
public static void setAllowHTMLObject(Boolean val)
setJComponentAccessorback to summary
public static void setJComponentAccessor(SwingAccessor.JComponentAccessor jCompAccessor)

Set an accessor object for the javax.swing.JComponent class.

setJLightweightFrameAccessorback to summary
public static void setJLightweightFrameAccessor(SwingAccessor.JLightweightFrameAccessor accessor)

Set an accessor object for the JLightweightFrame class.

setJTextComponentAccessorback to summary
public static void setJTextComponentAccessor(SwingAccessor.JTextComponentAccessor jtca)

Set an accessor object for the javax.swing.text.JTextComponent class.

setKeyStrokeAccessorback to summary
public static void setKeyStrokeAccessor(SwingAccessor.KeyStrokeAccessor accessor)
setLAFStateAccessorback to summary
public static void setLAFStateAccessor(SwingAccessor.LAFStateAccessor accessor)

Set an accessor object for the LAFState class.

setPopupFactoryAccessorback to summary
public static void setPopupFactoryAccessor(SwingAccessor.PopupFactoryAccessor popupFactoryAccessor)

Set an Accessor object for the PopupFactory class.

setRepaintManagerAccessorback to summary
public static void setRepaintManagerAccessor(SwingAccessor.RepaintManagerAccessor accessor)

Set an accessor object for the RepaintManager class.

setUIDefaultsAccessorback to summary
public static void setUIDefaultsAccessor(SwingAccessor.UIDefaultsAccessor accessor)

Set an accessor object for the UIDefaults class.

sun.swing back to summary

public Interface SwingAccessor.AccessibleComponentAccessor

Known Direct Implementers
javax.swing.JTree.AccessibleJTree.AccessibleJTreeNode.AccessibleJTreeNodeAccessor

This interface provides access to the renderer's accessibility component. For example, the renderer of a list element, a table cell, or a tree node

Method Summary

Modifier and TypeMethod and Description
public Accessible

Method Detail

getCurrentAccessibleback to summary
public Accessible getCurrentAccessible(AccessibleContext ac)
sun.swing back to summary

public Interface SwingAccessor.JComponentAccessor


An accessor for the JComponent class.

Method Summary

Modifier and TypeMethod and Description
public void
public boolean
getFlag(JComponent comp, int aFlag)

Method Detail

compWriteObjectNotifyback to summary
public void compWriteObjectNotify(JComponent comp)
getFlagback to summary
public boolean getFlag(JComponent comp, int aFlag)
sun.swing back to summary

public Interface SwingAccessor.JLightweightFrameAccessor


An accessor for the JLightweightFrame class.

Method Summary

Modifier and TypeMethod and Description
public void
updateCursor(JLightweightFrame frame)

Notifies the JLightweight frame that it needs to update a cursor

Method Detail

updateCursorback to summary
public void updateCursor(JLightweightFrame frame)

Notifies the JLightweight frame that it needs to update a cursor

sun.swing back to summary

public Interface SwingAccessor.JTextComponentAccessor


An accessor for the JTextComponent class. Note that we intentionally introduce the JTextComponentAccessor, and not the JComponentAccessor because the needed methods aren't override methods.

Method Summary

Modifier and TypeMethod and Description
public TransferHandler.DropLocation
dropLocationForPoint(JTextComponent textComp, Point p)

Calculates a custom drop location for the text component, representing where a drop at the given point should insert data.

public Object
setDropLocation(JTextComponent textComp, TransferHandler.DropLocation location, Object state, boolean forDrop)

Called to set or clear the drop location during a DnD operation.

Method Detail

dropLocationForPointback to summary
public TransferHandler.DropLocation dropLocationForPoint(JTextComponent textComp, Point p)

Calculates a custom drop location for the text component, representing where a drop at the given point should insert data.

setDropLocationback to summary
public Object setDropLocation(JTextComponent textComp, TransferHandler.DropLocation location, Object state, boolean forDrop)

Called to set or clear the drop location during a DnD operation.

sun.swing back to summary

public Interface SwingAccessor.KeyStrokeAccessor


Method Summary

Modifier and TypeMethod and Description
public KeyStroke

Method Detail

createback to summary
public KeyStroke create()
sun.swing back to summary

public Interface SwingAccessor.LAFStateAccessor


An accessor for the LAFState class state.

Method Summary

Modifier and TypeMethod and Description
public boolean

Method Detail

lafStateIsInitializedback to summary
public boolean lafStateIsInitialized()
sun.swing back to summary

public Interface SwingAccessor.PopupFactoryAccessor


An accessor for PopupFactory class.

Method Summary

Modifier and TypeMethod and Description
public Popup
getHeavyWeightPopup(PopupFactory factory, Component owner, Component contents, int ownerX, int ownerY)

Method Detail

getHeavyWeightPopupback to summary
public Popup getHeavyWeightPopup(PopupFactory factory, Component owner, Component contents, int ownerX, int ownerY)
sun.swing back to summary

public Interface SwingAccessor.RepaintManagerAccessor


An accessor for the RepaintManager class.

Method Summary

Modifier and TypeMethod and Description
public void
public void

Method Detail

addRepaintListenerback to summary
public void addRepaintListener(RepaintManager rm, SwingUtilities2.RepaintListener l)
removeRepaintListenerback to summary
public void removeRepaintListener(RepaintManager rm, SwingUtilities2.RepaintListener l)
sun.swing back to summary

public Interface SwingAccessor.UIDefaultsAccessor


An accessor for the UIDefaults class.

Method Summary

Modifier and TypeMethod and Description
public void
addInternalBundle(UIDefaults uiDefaults, String bundleName)

Adds a resource bundle to the list of resource bundles.

Method Detail

addInternalBundleback to summary
public void addInternalBundle(UIDefaults uiDefaults, String bundleName)

Adds a resource bundle to the list of resource bundles.