com.sas.swing.visuals
Class BasicCheckBoxListUI

com.sas.swing.visuals.BasicCheckBoxListUI
Direct Known Subclasses:
BasicTriStateCheckBoxListUI

public class BasicCheckBoxListUI

A Windows L&F implementation of CheckBoxListUI.

See Also:
CheckBoxList

Nested Class Summary
 class BasicCheckBoxListUI.CheckBoxListMouseInputHandler
          Mouse input, and focus handling for CheckBoxList.
static class BasicCheckBoxListUI.ClearSelectionAction
          Action to clear the selection in the list.
static class BasicCheckBoxListUI.EndAction
          Action to move the selection to the last item in the list.
static class BasicCheckBoxListUI.HomeAction
          Action to move the selection to the first item in the list.
static class BasicCheckBoxListUI.IncrementLeadSelectionAction
          Action to increment the selection in the list up/down a row at a type.
static class BasicCheckBoxListUI.PageDownAction
          Action to move down one page.
static class BasicCheckBoxListUI.PageUpAction
          Action to move up one page.
static class BasicCheckBoxListUI.SelectAllAction
          Action to select all the items in the list.
 
Field Summary
protected static int CHANGE_SELECTION
          Used by IncrementLeadSelectionAction.
protected static int MOVE_TO_SELECTION
          Used by IncrementLeadSelectionAction.
 
Constructor Summary
BasicCheckBoxListUI()
           
 
Method Summary
protected  javax.swing.ActionMap createActionMap()
          create new actionMap to handle key events for changing between rows and selecting rows
protected  javax.swing.event.MouseInputListener createMouseInputListener()
          Creates a delegate that implements MouseInputListener.
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent list)
          Returns a new instance of BasicCheckBoxListUI.
protected  javax.swing.ActionMap getActionMap()
          Get actionMap for CheckBoxList
protected  javax.swing.InputMap getInputMap(int condition)
          Get inputMap for CheckBoxList
protected  void installKeyboardActions()
          Register keyboard actions for the up and down arrow keys.
 

Field Detail

CHANGE_SELECTION

protected static final int CHANGE_SELECTION
Used by IncrementLeadSelectionAction. Indicates the action should change the selected item and the value of the item.

See Also:
Constant Field Values

MOVE_TO_SELECTION

protected static final int MOVE_TO_SELECTION
Used by IncrementLeadSelectionAction. Indicates the action should change the selected item but not the value of the item.

See Also:
Constant Field Values
Constructor Detail

BasicCheckBoxListUI

public BasicCheckBoxListUI()
Method Detail

installKeyboardActions

protected void installKeyboardActions()
Register keyboard actions for the up and down arrow keys. The actions just call out to protected methods, subclasses that want to override or extend keyboard behavior should consider just overriding those methods. This method is called at installUI() time.

Overrides:
installKeyboardActions in class javax.swing.plaf.basic.BasicListUI

getInputMap

protected javax.swing.InputMap getInputMap(int condition)
Get inputMap for CheckBoxList

Parameters:
condition -
Returns:
inputMap

getActionMap

protected javax.swing.ActionMap getActionMap()
Get actionMap for CheckBoxList

Returns:
actionMap

createActionMap

protected javax.swing.ActionMap createActionMap()
create new actionMap to handle key events for changing between rows and selecting rows

Returns:
actionMap

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent list)
Returns a new instance of BasicCheckBoxListUI. BasicCheckBoxListUI delegates are allocated one per CheckBoxList.

Returns:
A new CheckBoxListUI implementation for the Windows look and feel.

createMouseInputListener

protected javax.swing.event.MouseInputListener createMouseInputListener()
Creates a delegate that implements MouseInputListener. The delegate is added to the corresponding java.awt.Component listener lists at installUI() time. Subclasses can override this method to return a custom MouseInputListener, e.g.
 class BasicCheckBoxListUI extends BasicListUI {
    protected MouseInputListener createMouseInputListener() {
        return new MyCheckBoxListMouseInputHandler();
    }
    public class MyCheckBoxListMouseInputHandler extends MouseInputHandler {
        public void mouseMoved(MouseEvent e) {
            // do some extra work when the mouse moves
            super.mouseMoved(e);
        }
    }
 }
 

Overrides:
createMouseInputListener in class javax.swing.plaf.basic.BasicListUI



Copyright © 2009 SAS Institute Inc. All Rights Reserved.