本文整理匯總了Java中javax.swing.plaf.ActionMapUIResource.put方法的典型用法代碼示例。如果您正苦於以下問題:Java ActionMapUIResource.put方法的具體用法?Java ActionMapUIResource.put怎麽用?Java ActionMapUIResource.put使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.plaf.ActionMapUIResource
的用法示例。
在下文中一共展示了ActionMapUIResource.put方法的13個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: installKeyboardActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Installs look and feel keyboard actions on the root pane.
*
* @param rp the root pane to install the keyboard actions to
*/
protected void installKeyboardActions(JRootPane rp)
{
// Install the keyboard actions.
ActionMapUIResource am = new ActionMapUIResource();
am.put("press", new DefaultPressAction(rp));
am.put("release", new DefaultReleaseAction(rp));
SwingUtilities.replaceUIActionMap(rp, am);
// Install the input map from the UIManager. It seems like the actual
// bindings are installed in the JRootPane only when the defaultButton
// property receives a value. So we also only install an empty
// input map here, and fill it in propertyChange.
ComponentInputMapUIResource im = new ComponentInputMapUIResource(rp);
SwingUtilities.replaceUIInputMap(rp, JComponent.WHEN_IN_FOCUSED_WINDOW,
im);
}
示例2: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Creates the default actions when there are none specified by the L&F.
*
* @return the default actions
*/
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action = new NavigateAction("selectNext");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("selectPrevious");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("selectParent");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("selectChild");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("return");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("cancel");
am.put(action.getValue(Action.NAME), action);
return am;
}
示例3: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Creates the default actions when there are none specified by the L&F.
*
* @return the default actions
*/
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action = new NavigateAction("selectNext");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("selectPrevious");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("selectParent");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("selectChild");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("return");
am.put(action.getValue(Action.NAME), action);
action = new NavigateAction("cancel");
am.put(action.getValue(Action.NAME), action);
return am;
}
示例4: installKeyboardActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
protected void installKeyboardActions() {
createInternalFrameListener();
frame.addInternalFrameListener(internalFrameListener);
ActionMapUIResource actionMap = new ActionMapUIResource();
actionMap.put("showSystemMenu", new AbstractAction() {
public void actionPerformed(final ActionEvent e) {
if (titlePane != null) {
titlePane.showSystemMenu();
}
}
});
actionMap.setParent(((BasicLookAndFeel)UIManager.getLookAndFeel())
.getAudioActionMap());
SwingUtilities.replaceUIActionMap(frame, actionMap);
}
示例5: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Creates the default actions when there are none specified by the L&F.
*
* @return the default actions
*/
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action = new FocusAction();
am.put(action.getValue(Action.NAME), action);
return am;
}
示例6: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action = new ToolBarAction();
am.put("navigateLeft", action);
am.put("navigateRight", action);
am.put("navigateUp", action);
am.put("navigateDown", action);
return am;
}
示例7: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action = new OptionPaneCloseAction();
am.put("close", action);
return am;
}
示例8: createDefaultActionMap
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Creates and returns the default action map for Swing buttons.
*
* @return the default action map for Swing buttons
*/
private ActionMap createDefaultActionMap()
{
Action action = new ButtonAction();
ActionMapUIResource am = new ActionMapUIResource();
am.put(ButtonAction.PRESSED, action);
am.put(ButtonAction.RELEASED, action);
return am;
}
示例9: installKeyboardActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* This method installs the keyboard actions for the JInternalFrame.
*/
protected void installKeyboardActions()
{
ActionMapUIResource am = new ActionMapUIResource();
am.put("showSystemMenu", new ShowSystemMenuAction());
// The RI impl installs the audio actions as parent of the UI action map,
// so do we.
BasicLookAndFeel blaf = (BasicLookAndFeel) UIManager.getLookAndFeel();
ActionMap audioActionMap = blaf.getAudioActionMap();
am.setParent(audioActionMap);
SwingUtilities.replaceUIActionMap(frame, am);
}
示例10: getAudioActionMap
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
protected ActionMap getAudioActionMap() {
ActionMapUIResource result = new ActionMapUIResource();
Object[] actions = (Object[])getDefaults().get("AuditoryCues.cueList");
if (actions == null) {
return result;
}
for (int i = 0; i < actions.length; i++) {
result.put(actions[i], createAudioAction(actions[i]));
}
return result;
}
示例11: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action = new TableAction();
am.put("cut", TransferHandler.getCutAction());
am.put("copy", TransferHandler.getCopyAction());
am.put("paste", TransferHandler.getPasteAction());
am.put("cancel", action);
am.put("selectAll", action);
am.put("clearSelection", action);
am.put("startEditing", action);
am.put("selectNextRow", action);
am.put("selectNextRowCell", action);
am.put("selectNextRowExtendSelection", action);
am.put("selectNextRowChangeLead", action);
am.put("selectPreviousRow", action);
am.put("selectPreviousRowCell", action);
am.put("selectPreviousRowExtendSelection", action);
am.put("selectPreviousRowChangeLead", action);
am.put("selectNextColumn", action);
am.put("selectNextColumnCell", action);
am.put("selectNextColumnExtendSelection", action);
am.put("selectNextColumnChangeLead", action);
am.put("selectPreviousColumn", action);
am.put("selectPreviousColumnCell", action);
am.put("selectPreviousColumnExtendSelection", action);
am.put("selectPreviousColumnChangeLead", action);
am.put("scrollLeftChangeSelection", action);
am.put("scrollLeftExtendSelection", action);
am.put("scrollRightChangeSelection", action);
am.put("scrollRightExtendSelection", action);
am.put("scrollUpChangeSelection", action);
am.put("scrollUpExtendSelection", action);
am.put("scrollDownChangeSelection", action);
am.put("scrolldownExtendSelection", action);
am.put("selectFirstColumn", action);
am.put("selectFirstColumnExtendSelection", action);
am.put("selectLastColumn", action);
am.put("selectLastColumnExtendSelection", action);
am.put("selectFirstRow", action);
am.put("selectFirstRowExtendSelection", action);
am.put("selectLastRow", action);
am.put("selectLastRowExtendSelection", action);
am.put("addToSelection", action);
am.put("toggleAndAnchor", action);
am.put("extendTo", action);
am.put("moveSelectionTo", action);
return am;
}
示例12: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Creates the default actions when there are none specified by the L&F.
*
* @return the default actions
*/
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action;
// TreeHomeAction.
action = new TreeHomeAction(-1, "selectFirst");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(-1, "selectFirstChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(-1, "selectFirstExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(1, "selectLast");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(1, "selectLastChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(1, "selectLastExtendSelection");
am.put(action.getValue(Action.NAME), action);
// TreeIncrementAction.
action = new TreeIncrementAction(-1, "selectPrevious");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(-1, "selectPreviousExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(-1, "selectPreviousChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(1, "selectNext");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(1, "selectNextExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(1, "selectNextChangeLead");
am.put(action.getValue(Action.NAME), action);
// TreeTraverseAction.
action = new TreeTraverseAction(-1, "selectParent");
am.put(action.getValue(Action.NAME), action);
action = new TreeTraverseAction(1, "selectChild");
am.put(action.getValue(Action.NAME), action);
// TreeToggleAction.
action = new TreeToggleAction("toggleAndAnchor");
am.put(action.getValue(Action.NAME), action);
// TreePageAction.
action = new TreePageAction(-1, "scrollUpChangeSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(-1, "scrollUpExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(-1, "scrollUpChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownChangeSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownChangeLead");
am.put(action.getValue(Action.NAME), action);
// Tree editing actions
action = new TreeStartEditingAction("startEditing");
am.put(action.getValue(Action.NAME), action);
action = new TreeCancelEditingAction("cancel");
am.put(action.getValue(Action.NAME), action);
return am;
}
示例13: createDefaultActions
import javax.swing.plaf.ActionMapUIResource; //導入方法依賴的package包/類
/**
* Creates the default actions when there are none specified by the L&F.
*
* @return the default actions
*/
private ActionMap createDefaultActions()
{
ActionMapUIResource am = new ActionMapUIResource();
Action action;
// TreeHomeAction.
action = new TreeHomeAction(-1, "selectFirst");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(-1, "selectFirstChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(-1, "selectFirstExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(1, "selectLast");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(1, "selectLastChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreeHomeAction(1, "selectLastExtendSelection");
am.put(action.getValue(Action.NAME), action);
// TreeIncrementAction.
action = new TreeIncrementAction(-1, "selectPrevious");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(-1, "selectPreviousExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(-1, "selectPreviousChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(1, "selectNext");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(1, "selectNextExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreeIncrementAction(1, "selectNextChangeLead");
am.put(action.getValue(Action.NAME), action);
// TreeTraverseAction.
action = new TreeTraverseAction(-1, "selectParent");
am.put(action.getValue(Action.NAME), action);
action = new TreeTraverseAction(1, "selectChild");
am.put(action.getValue(Action.NAME), action);
// TreeToggleAction.
action = new TreeToggleAction("toggleAndAnchor");
am.put(action.getValue(Action.NAME), action);
// TreePageAction.
action = new TreePageAction(-1, "scrollUpChangeSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(-1, "scrollUpExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(-1, "scrollUpChangeLead");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownChangeSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownExtendSelection");
am.put(action.getValue(Action.NAME), action);
action = new TreePageAction(1, "scrollDownChangeLead");
am.put(action.getValue(Action.NAME), action);
// Tree editing actions
action = new TreeStartEditingAction("startEditing");
am.put(action.getValue(Action.NAME), action);
action = new TreeCancelEditingAction("cancel");
am.put(action.getValue(Action.NAME), action);
return am;
}