APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.awt.X11

public final Class XChoicePeer

extends XComponentPeer
implements ChoicePeer, ToplevelStateListener
Class Inheritance
All Implemented Interfaces
sun.awt.X11.ToplevelStateListener, java.awt.peer.ChoicePeer, java.awt.peer.ComponentPeer
Imports
java.awt.Color, .Insets, .Point, .FontMetrics, .Dimension, .Rectangle, .Choice, .Toolkit, .Graphics, .Component, .AWTEvent, .Insets, .Font, java.awt.peer.ChoicePeer, java.awt.event.FocusEvent, .InvocationEvent, .MouseEvent, .MouseWheelEvent, .KeyEvent, .ItemEvent, sun.util.logging.PlatformLogger

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class
XChoicePeer.UnfurledChoice

Inner class for the unfurled Choice list Much, much more docs

Field Summary

Modifier and TypeField and Description
private Component
public static final int
private XChoicePeerListener
private boolean
private int
private boolean
private boolean
pack-priv static final Color
private static final Insets
private ListHelper
public static final int
private static final PlatformLogger
private static final int
private boolean
public static final int
public static final int
pack-priv static final int
pack-priv static final int
private boolean
private XChoicePeer.UnfurledChoice
private boolean
pack-priv static final int
Inherited from sun.awt.X11.XComponentPeer:
backgroundBACKGROUND_COLORbHasFocusboundsOperationdarkShadowfontforegroundFOREGROUND_COLORHIGHLIGHT_COLORisLayoutinglightShadowpaintPendingselectColorSHADOW_COLORsystemColors

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(String item, int index)

Implements java.awt.peer.ChoicePeer.add.

Adds an item with the string item to the combo box list at index index.

public void
public void
dispose()

Overrides sun.awt.X11.XWindow.dispose.

Implements java.awt.peer.ComponentPeer.dispose.

Disposes all resources held by the component peer.

public void
focusGained(FocusEvent e)

Overrides sun.awt.X11.XComponentPeer.focusGained.

Called when component receives focus

public void
focusLost(FocusEvent e)

Overrides sun.awt.X11.XComponentPeer.focusLost.

Called when component loses focus

public Dimension
getMinimumSize()

Overrides sun.awt.X11.XComponentPeer.getMinimumSize.

Implements java.awt.peer.ComponentPeer.getMinimumSize.

Determines the minimum size of the component.

pack-priv void
pack-priv void
pack-priv void
public boolean
public boolean
handlesWheelScrolling()

Overrides sun.awt.X11.XComponentPeer.handlesWheelScrolling.

Implements java.awt.peer.ComponentPeer.handlesWheelScrolling.

Determines if the component handles wheel scrolling itself.

pack-priv void
protected void
public boolean
isFocusable()

Overrides sun.awt.X11.XComponentPeer.isFocusable.

Implements java.awt.peer.ComponentPeer.isFocusable.

Returns true when the component takes part in the focus traversal, false otherwise.

private boolean
public boolean
public void
public void
layout()

Overrides sun.awt.X11.XComponentPeer.layout.

Implements java.awt.peer.ComponentPeer.layout.

Used by lightweight implementations to tell a ComponentPeer to layout its sub-elements.

public void
public void
public void
protected void
paintFocus(Graphics g, int x, int y, int w, int h)

pack-priv void
paintPeer(final Graphics g)

Overrides sun.awt.X11.XWindow.paintPeer.

Paint the choice

pack-priv void
postInit(XCreateWindowParams params)

Overrides sun.awt.X11.XComponentPeer.postInit.

Called after window creation, descendants should override to initialize Window with class-specific values and perform post-initialization actions.

pack-priv void
preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XComponentPeer.preInit.

Called before window creation, descendants should override to initialize the data, initialize params.

pack-priv boolean
prePostEvent(final AWTEvent e)

Overrides sun.awt.X11.XWindow.prePostEvent.

Returns true if the event has been handled and should not be posted to Java.

public void
remove(int index)

Implements java.awt.peer.ChoicePeer.remove.

Removes the item at index index from the combo box list.

public void
removeAll()

Implements java.awt.peer.ChoicePeer.removeAll.

Removes all items from the combo box list.

public void
public void
select(int index)

Implements java.awt.peer.ChoicePeer.select.

Selects the item at index index.

public void
public void
setBackground(Color c)

Overrides sun.awt.X11.XComponentPeer.setBackground.

Implements java.awt.peer.ComponentPeer.setBackground.

Sets the background color of this component.

public void
setBounds(int x, int y, int width, int height, int op)

Overrides sun.awt.X11.XComponentPeer.setBounds.

Implements java.awt.peer.ComponentPeer.setBounds.

Sets the location or size or both of the component.

public void
setDrawSelectedItem(boolean value)

public void
setEnabled(boolean value)

Overrides sun.awt.X11.XComponentPeer.setEnabled.

Implements java.awt.peer.ComponentPeer.setEnabled.

Enables or disables a component.

public void
setFont(Font font)

Overrides sun.awt.X11.XComponentPeer.setFont.

Implements java.awt.peer.ComponentPeer.setFont.

Sets the font of this component.

public void
setForeground(Color c)

Overrides sun.awt.X11.XComponentPeer.setForeground.

Implements java.awt.peer.ComponentPeer.setForeground.

Sets the foreground color of this component.

public void
public void
pack-priv void
Inherited from sun.awt.X11.XComponentPeer:
addDropTargetapplyShapebeginLayoutbeginValidatecanDetermineObscuritycoalescePaintEventcreateBufferscreateImagecreateVolatileImagedestroyBuffersdraw3DOvaldraw3DOvaldraw3DRectdraw3DRectdrawMotif3DRectdrawScrollbarendLayoutendValidateflipgetBackBuffergetBackBufferCapsgetFontgetFontMetricsgetGraphicsgetGUIcolorsgetInsetsgetParentTopLevelgetPeerBackgroundgetPeerFontgetPeerForegroundgetPeerSizegetPreferredSizegetRGBvalsgetSystemColorsgetWinBackgroundhandleEventhandleF10JavaKeyEventhandleJavaFocusEventhandleJavaInputMethodEventhandleJavaWindowFocusEventhasFocushideisEnabledisEventDisabledisInitialReshapeisObscuredisPaintPendingisReparentSupportednotifyTextComponentChangeoperationToStringpaintprintpSetCursorpSetCursorremoveDropTargetreparentrequestFocusreshapesetBoundsOperationsetVisiblesetZOrderupdateCursorImmediatelyupdateGraphicsDataupdateMotifColorswrapInSequenced

Field Detail

alignUnderback to summary
private Component alignUnder
BORDER_WIDTHback to summary
public static final int BORDER_WIDTH
choiceListenerback to summary
private XChoicePeerListener choiceListener
draggingback to summary
private boolean dragging
dragStartIdxback to summary
private int dragStartIdx
drawSelectedItemback to summary
private boolean drawSelectedItem
firstPressback to summary
private boolean firstPress
focusColorback to summary
pack-priv static final Color focusColor
focusInsetsback to summary
private static final Insets focusInsets
helperback to summary
private ListHelper helper
ITEM_MARGINback to summary
public static final int ITEM_MARGIN
logback to summary
private static final PlatformLogger log

Hides sun.awt.X11.XComponentPeer.log.

MAX_UNFURLED_ITEMSback to summary
private static final int MAX_UNFURLED_ITEMS
mouseInSBback to summary
private boolean mouseInSB
SCROLLBAR_WIDTHback to summary
public static final int SCROLLBAR_WIDTH
TEXT_SPACEback to summary
public static final int TEXT_SPACE
TEXT_XPADback to summary
pack-priv static final int TEXT_XPAD
TEXT_YPADback to summary
pack-priv static final int TEXT_YPAD
unfurledback to summary
private boolean unfurled
unfurledChoiceback to summary
private XChoicePeer.UnfurledChoice unfurledChoice
wasDraggedback to summary
private boolean wasDragged
WIDGET_OFFSETback to summary
pack-priv static final int WIDGET_OFFSET

Constructor Detail

XChoicePeerback to summary
pack-priv XChoicePeer(Choice target)

Method Detail

addback to summary
public void add(String item, int index)

Implements java.awt.peer.ChoicePeer.add.

Doc from java.awt.peer.ChoicePeer.add.

Adds an item with the string item to the combo box list at index index.

Annotations
@Override
addXChoicePeerListenerback to summary
public void addXChoicePeerListener(XChoicePeerListener l)
disposeback to summary
public void dispose()

Overrides sun.awt.X11.XWindow.dispose.

Implements java.awt.peer.ComponentPeer.dispose.

Doc from java.awt.peer.ComponentPeer.dispose.

Disposes all resources held by the component peer. This is called when the component has been disconnected from the component hierarchy and is about to be garbage collected.

Annotations
@Override
focusGainedback to summary
public void focusGained(FocusEvent e)

Overrides sun.awt.X11.XComponentPeer.focusGained.

Doc from sun.awt.X11.XComponentPeer.focusGained.

Called when component receives focus

Annotations
@Override
focusLostback to summary
public void focusLost(FocusEvent e)

Overrides sun.awt.X11.XComponentPeer.focusLost.

Doc from sun.awt.X11.XComponentPeer.focusLost.

Called when component loses focus

Annotations
@Override
getMinimumSizeback to summary
public Dimension getMinimumSize()

Overrides sun.awt.X11.XComponentPeer.getMinimumSize.

Implements java.awt.peer.ComponentPeer.getMinimumSize.

Doc from java.awt.peer.ComponentPeer.getMinimumSize.

Determines the minimum size of the component.

Annotations
@Override
@SuppressWarnings:deprecation
handleJavaKeyEventback to summary
pack-priv void handleJavaKeyEvent(KeyEvent e)

Overrides sun.awt.X11.XComponentPeer.handleJavaKeyEvent.

Annotations
@Override
handleJavaMouseEventback to summary
pack-priv void handleJavaMouseEvent(MouseEvent e)

Overrides sun.awt.X11.XComponentPeer.handleJavaMouseEvent.

Annotations
@Override
handleJavaMouseWheelEventback to summary
pack-priv void handleJavaMouseWheelEvent(MouseWheelEvent e)

Overrides sun.awt.X11.XComponentPeer.handleJavaMouseWheelEvent.

Annotations
@Override
handleMouseEventByChoiceback to summary
public boolean handleMouseEventByChoice(final MouseEvent me)
handlesWheelScrollingback to summary
public boolean handlesWheelScrolling()

Overrides sun.awt.X11.XComponentPeer.handlesWheelScrolling.

Implements java.awt.peer.ComponentPeer.handlesWheelScrolling.

Doc from java.awt.peer.ComponentPeer.handlesWheelScrolling.

Determines if the component handles wheel scrolling itself. Otherwise it is delegated to the component's parent.

Annotations
@Override
hidePopdownMenuback to summary
pack-priv void hidePopdownMenu()
initGraphicsConfigurationback to summary
protected void initGraphicsConfiguration()

Overrides sun.awt.X11.XWindow.initGraphicsConfiguration.

Annotations
@Override
isFocusableback to summary
public boolean isFocusable()

Overrides sun.awt.X11.XComponentPeer.isFocusable.

Implements java.awt.peer.ComponentPeer.isFocusable.

Doc from java.awt.peer.ComponentPeer.isFocusable.

Returns true when the component takes part in the focus traversal, false otherwise.

Annotations
@Override
isMouseEventInChoiceback to summary
private boolean isMouseEventInChoice(MouseEvent e)
isUnfurledback to summary
public boolean isUnfurled()
keyPressedback to summary
public void keyPressed(KeyEvent e)
layoutback to summary
public void layout()

Overrides sun.awt.X11.XComponentPeer.layout.

Implements java.awt.peer.ComponentPeer.layout.

Doc from java.awt.peer.ComponentPeer.layout.

Used by lightweight implementations to tell a ComponentPeer to layout its sub-elements. For instance, a lightweight Checkbox needs to layout the box, as well as the text label.

Annotations
@Override
mouseDraggedback to summary
public void mouseDragged(MouseEvent e)
Annotations
@SuppressWarnings:deprecation
mousePressedback to summary
public void mousePressed(MouseEvent e)
mouseReleasedback to summary
public void mouseReleased(MouseEvent e)
paintFocusback to summary
protected void paintFocus(Graphics g, int x, int y, int w, int h)
paintPeerback to summary
pack-priv void paintPeer(final Graphics g)

Overrides sun.awt.X11.XWindow.paintPeer.

Paint the choice

Annotations
@Override
postInitback to summary
pack-priv void postInit(XCreateWindowParams params)

Overrides sun.awt.X11.XComponentPeer.postInit.

Doc from sun.awt.X11.XBaseWindow.postInit.

Called after window creation, descendants should override to initialize Window with class-specific values and perform post-initialization actions.

Annotations
@Override
preInitback to summary
pack-priv void preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XComponentPeer.preInit.

Doc from sun.awt.X11.XBaseWindow.preInit.

Called before window creation, descendants should override to initialize the data, initialize params.

Annotations
@Override
prePostEventback to summary
pack-priv boolean prePostEvent(final AWTEvent e)

Overrides sun.awt.X11.XWindow.prePostEvent.

Doc from sun.awt.X11.XWindow.prePostEvent.

Returns true if the event has been handled and should not be posted to Java.

Annotations
@Override
removeback to summary
public void remove(int index)

Implements java.awt.peer.ChoicePeer.remove.

Doc from java.awt.peer.ChoicePeer.remove.

Removes the item at index index from the combo box list.

Annotations
@Override
removeAllback to summary
public void removeAll()

Implements java.awt.peer.ChoicePeer.removeAll.

Doc from java.awt.peer.ChoicePeer.removeAll.

Removes all items from the combo box list.

Annotations
@Override
removeXChoicePeerListenerback to summary
public void removeXChoicePeerListener()
selectback to summary
public void select(int index)

Implements java.awt.peer.ChoicePeer.select.

Doc from java.awt.peer.ChoicePeer.select.

Selects the item at index index.

Annotations
@Override
setAlignUnderback to summary
public void setAlignUnder(Component comp)
setBackgroundback to summary
public void setBackground(Color c)

Overrides sun.awt.X11.XComponentPeer.setBackground.

Implements java.awt.peer.ComponentPeer.setBackground.

Doc from java.awt.peer.ComponentPeer.setBackground.

Sets the background color of this component.

Annotations
@Override
setBoundsback to summary
public void setBounds(int x, int y, int width, int height, int op)

Overrides sun.awt.X11.XComponentPeer.setBounds.

Implements java.awt.peer.ComponentPeer.setBounds.

Doc from java.awt.peer.ComponentPeer.setBounds.

Sets the location or size or both of the component. The location is specified relative to the component's parent. The op parameter specifies which properties change. If it is SET_LOCATION, then only the location changes (and the size parameters can be ignored). If op is SET_SIZE, then only the size changes (and the location can be ignored). If op is SET_BOUNDS, then both change. There is a special value SET_CLIENT_SIZE, which is used only for window-like components to set the size of the client (i.e. the 'inner' size, without the insets of the window borders).

Annotations
@Override
setDrawSelectedItemback to summary
public void setDrawSelectedItem(boolean value)
setEnabledback to summary
public void setEnabled(boolean value)

Overrides sun.awt.X11.XComponentPeer.setEnabled.

Implements java.awt.peer.ComponentPeer.setEnabled.

Doc from java.awt.peer.ComponentPeer.setEnabled.

Enables or disables a component. Disabled components are usually grayed out and cannot be activated.

Annotations
@Override
setFontback to summary
public void setFont(Font font)

Overrides sun.awt.X11.XComponentPeer.setFont.

Implements java.awt.peer.ComponentPeer.setFont.

Doc from java.awt.peer.ComponentPeer.setFont.

Sets the font of this component.

Annotations
@Override
setForegroundback to summary
public void setForeground(Color c)

Overrides sun.awt.X11.XComponentPeer.setForeground.

Implements java.awt.peer.ComponentPeer.setForeground.

Doc from java.awt.peer.ComponentPeer.setForeground.

Sets the foreground color of this component.

Annotations
@Override
stateChangedICCCMback to summary
public void stateChangedICCCM(int oldState, int newState)

Implements sun.awt.X11.ToplevelStateListener.stateChangedICCCM.

Annotations
@Override
stateChangedJavaback to summary
public void stateChangedJava(int oldState, int newState)

Implements sun.awt.X11.ToplevelStateListener.stateChangedJava.

Annotations
@Override
ungrabInputImplback to summary
pack-priv void ungrabInputImpl()

Overrides sun.awt.X11.XBaseWindow.ungrabInputImpl.

Annotations
@Override
sun.awt.X11 back to summary

pack-priv final Class XChoicePeer.UnfurledChoice

extends XWindow
Class Inheritance

Inner class for the unfurled Choice list Much, much more docs

Field Summary

Inherited from sun.awt.X11.XWindow:
backgroundColorclickCountgraphicsConfiggraphicsConfigDatalastButtonlastTimelastWindowReflastXlastYmwm_hintsoldHeightoldWidthpaintAreaparentREPARENTEDsurfaceDatatargetTARGETwinAttrwm_delete_windowwm_protocolswm_take_focus

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
public void
private boolean
private boolean
isMouseInListArea(MouseEvent e)

Tests if the mouse cursor is in the Unfurled Choice, yet not in the vertical scrollbar

public void
public void
pack-priv Rectangle
public void
preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XWindow.preInit.

Called before window creation, descendants should override to initialize the data, initialize params.

public void
public void
setVisible(boolean vis)

public void
private Point
toLocalCoords(MouseEvent e)

Return a MouseEvent's Point in coordinates relative to the UnfurledChoice.

public void
private void
trackSelection(int transX, int transY)

Inherited from sun.awt.X11.XWindow:
disposedoEraseBackgrounddoLayoutdoValidateSurfaceenterNotifyflushgetAWTKeyCodeForKeySymgetColorModelgetColorModelgetDefaultFontgetEventSourcegetFontMetricsgetGraphicsgetGraphicsgetGraphicsConfigurationgetGraphicsConfigurationDatagetKeySymForAWTKeyCodegetLocationOnScreengetModifiersgetMouseMovementSmudgegetMWMHintsgetParentWindowIDgetParentXWindowObjectgetScalegetSurfaceDatagetTargetgetTargetBoundsgetWheelModifiersgetWinBackgroundgetWMClassgetWMProtocolsgetWMStategetXModifiershandleButtonPressReleasehandleExposeEventhandleKeyPresshandleKeyPresshandleKeyReleasehandleMotionNotifyhandlePropertyNotifyhandleXCrossingEventinitGraphicsConfigurationinitWMProtocolsisEmbeddedisFullScreenExclusiveModeisLocationByPlatformisMouseAboveisParentOfisReparentedisResizableisShowingisWheelkeyEventType2IdkeysymToUnicodelayoutleaveNotifylogIncomingKeyEventpaintpopuppostEventpostEventStaticpostEventToEventQueuepostInitpostKeyEventpostPaintEventprePostEventrepaintreshapereshapescaleDownscaleUpsendEventsetBackgroundsetBDatasetFullScreenExclusiveModeStatesetMouseAbovesetMWMHintssetReparentedstateChangedupdateSizeHintsupdateSizeHintsupdateSizeHintsvalidateSurfacewinBackgroundxSetBackground

Constructor Detail

UnfurledChoiceback to summary
public UnfurledChoice(Component target)

Method Detail

handleConfigureNotifyEventback to summary
public void handleConfigureNotifyEvent(XEvent xev)

Overrides sun.awt.X11.XWindow.handleConfigureNotifyEvent.

Annotations
@Override
handleMapNotifyEventback to summary
public void handleMapNotifyEvent(XEvent xev)

Overrides sun.awt.X11.XWindow.handleMapNotifyEvent.

Annotations
@Override
handleUnmapNotifyEventback to summary
public void handleUnmapNotifyEvent(XEvent xev)

Overrides sun.awt.X11.XWindow.handleUnmapNotifyEvent.

Annotations
@Override
isMouseEventInsideback to summary
private boolean isMouseEventInside(MouseEvent e)
isMouseInListAreaback to summary
private boolean isMouseInListArea(MouseEvent e)

Tests if the mouse cursor is in the Unfurled Choice, yet not in the vertical scrollbar

paintBackgroundback to summary
public void paintBackground()
paintPeerback to summary
public void paintPeer(Graphics g)

Overrides sun.awt.X11.XWindow.paintPeer.

Annotations
@Override
placeOnScreenback to summary
pack-priv Rectangle placeOnScreen()
preInitback to summary
public void preInit(XCreateWindowParams params)

Overrides sun.awt.X11.XWindow.preInit.

Doc from sun.awt.X11.XBaseWindow.preInit.

Called before window creation, descendants should override to initialize the data, initialize params.

Annotations
@Override
repaintback to summary
public void repaint()

Overrides sun.awt.X11.XWindow.repaint.

Annotations
@Override
setVisibleback to summary
public void setVisible(boolean vis)
toFrontback to summary
public void toFront()

Overrides sun.awt.X11.XBaseWindow.toFront.

Annotations
@Override
toLocalCoordsback to summary
private Point toLocalCoords(MouseEvent e)

Return a MouseEvent's Point in coordinates relative to the UnfurledChoice.

trackMouseback to summary
public void trackMouse(MouseEvent e)
trackSelectionback to summary
private void trackSelection(int transX, int transY)