本文整理了Java中org.openide.util.Utilities.actionsGlobalContext()
方法的一些代码示例,展示了Utilities.actionsGlobalContext()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.actionsGlobalContext()
方法的具体详情如下:
包路径:org.openide.util.Utilities
类名称:Utilities
方法名:actionsGlobalContext
[英]Global context for actions. Toolbar, menu or any other "global" action presenters shall operate in this context. Presenters for context menu items should not use this method; instead see ContextAwareAction.
[中]行动的全球背景。工具栏、菜单或任何其他“全局”动作演示者应在这种情况下操作。上下文菜单项的演示者不应使用此方法;相反,请看ContextAwareAction。
代码示例来源:origin: org.netbeans.api/org-openide-util
/** Create the default popup menu representation of an array of actions.
* @param actions actions to show in the generated menu
* @return a popup menu displaying them
*
* @deprecated Use {@link org.openide.util.Utilities#actionsToPopup}
*/
@Deprecated
public static JPopupMenu createPopupMenu(SystemAction[] actions) {
return Utilities.actionsToPopup(actions, Utilities.actionsGlobalContext());
}
代码示例来源:origin: org.netbeans.api/org-openide-util
private GlobalManager() {
result = Utilities.actionsGlobalContext().lookup(new Lookup.Template<ActionMap>(ActionMap.class));
result.addLookupListener(this);
resultChanged(null);
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
protected BaseDelAction(Map map, Action fallback) {
this(
map,
map.get("key"), // NOI18N
Utilities.actionsGlobalContext(), // NOI18N
fallback, // NOI18N
Boolean.TRUE.equals(map.get("surviveFocusChange")), // NOI18N
Boolean.TRUE.equals(map.get("asynchronous")) // NOI18N
);
}
代码示例来源:origin: org.netbeans.api/org-openide-util-ui
/** Create the default popup menu representation of an array of actions.
* @param actions actions to show in the generated menu
* @return a popup menu displaying them
*
* @deprecated Use {@link org.openide.util.Utilities#actionsToPopup}
*/
@Deprecated
public static JPopupMenu createPopupMenu(SystemAction[] actions) {
return Utilities.actionsToPopup(actions, Utilities.actionsGlobalContext());
}
代码示例来源:origin: org.netbeans.api/org-openide-awt
public static ContextAwareAction context(Map map) {
Class<?> dataType = readClass(map.get("type")); // NOI18N
return new DelegateAction(map, _context(map, dataType, Utilities.actionsGlobalContext()));
}
public static Action bindContext(Map map, Lookup context) {
代码示例来源:origin: org.netbeans.api/org-openide-util-ui
private GlobalManager() {
result = Utilities.actionsGlobalContext().lookup(new Lookup.Template<ActionMap>(ActionMap.class));
result.addLookupListener(this);
resultChanged(null);
}
代码示例来源:origin: org.netbeans.api/org-openide-nodes
/** Activates/passivates the listener.
*/
synchronized void setActive(boolean active) {
Lookup context = Utilities.actionsGlobalContext();
if (active) {
if (result == null) {
result = context.lookupResult(Node.class);
result.addLookupListener(this);
}
} else {
// result.removeLookupListener (this);
// result = null;
// Any saved PROP_ENABLED will be bogus now:
forget(true);
forget(false);
}
}
代码示例来源:origin: nl.cloudfarming.client/sensor-api
public ChangePaletteAction() {
putValue(NAME, DISPLAY_NAME);
sensorDataObject = Utilities.actionsGlobalContext().lookup(SensorDataObject.class);
sensorFileLayer = Utilities.actionsGlobalContext().lookup(SensorFileLayer.class);
options = (ArrayList) getPaletteOptions();
comboBox = new JComboBox(options.toArray());
comboBox.setEditable(false);
}
代码示例来源:origin: nl.cloudfarming.client/area-field
public RemoveFieldAction() {
super(ACTION_NAME);
field = Utilities.actionsGlobalContext().lookup(Field.class);
service = getService();
}
代码示例来源:origin: in.jlibs/org-openide-util
/** Create the default popup menu representation of an array of actions.
* @param actions actions to show in the generated menu
* @return a popup menu displaying them
*
* @deprecated Use {@link org.openide.util.Utilities#actionsToPopup}
*/
@Deprecated
public static JPopupMenu createPopupMenu(SystemAction[] actions) {
return Utilities.actionsToPopup(actions, Utilities.actionsGlobalContext());
}
代码示例来源:origin: uk.gov.nationalarchives.thirdparty.netbeans/org-openide-util
/** Create the default popup menu representation of an array of actions.
* @param actions actions to show in the generated menu
* @return a popup menu displaying them
*
* @deprecated Use {@link org.openide.util.Utilities#actionsToPopup}
*/
@Deprecated
public static JPopupMenu createPopupMenu(SystemAction[] actions) {
return Utilities.actionsToPopup(actions, Utilities.actionsGlobalContext());
}
代码示例来源:origin: nl.cloudfarming.client/cloudfarming-client-geoviewer-jxmap
public VisibilityLayerAction() {
Layer layer = Utilities.actionsGlobalContext().lookup(Layer.class);
MapController mapApi = Utilities.actionsGlobalContext().lookup(MapController.class);
layerInfo = mapApi.getLayerInfo(layer);
setName(layerInfo);
layerInfo.addPropertyChangeListener(LayerInfo.PROPERTY_VISIBLE, new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
setName(layerInfo);
}
});
}
代码示例来源:origin: net.sourceforge.javydreamercsw/Client-UI
/**
* Creates new form EditTestCaseDialog
*/
public EditTestCaseDialog(java.awt.Frame parent, boolean modal, boolean edit) {
super(parent, modal);
initComponents();
this.edit = edit;
if (edit) {
testCaseName.setText(Utilities.actionsGlobalContext()
.lookup(TestCase.class).getName());
}
}
代码示例来源:origin: net.sf.squirrel-sql.thirdpary-non-maven/openide
private GlobalManager() {
result = Utilities.actionsGlobalContext ().lookup (
new Lookup.Template (ActionMap.class)
);
result.addLookupListener(this);
}
代码示例来源:origin: org.rwshop/org.rwshop.nb.animation
@Override
public void componentOpened() {
result = Utilities.actionsGlobalContext().lookupResult(AnimationNode.class);
result.allItems();
result.addLookupListener (this);
}
代码示例来源:origin: org.rwshop/org.rwshop.nb.animation
@Override
public void componentOpened() {
result = Utilities.actionsGlobalContext().lookupResult(AnimationNode.class);
result.allItems();
result.addLookupListener (this);
}
代码示例来源:origin: org.rwshop/org.rwshop.nb.animation
@Override
public void componentOpened() {
result = Utilities.actionsGlobalContext().lookupResult(AnimationNode.class);
result.allItems();
result.addLookupListener (this);
}
代码示例来源:origin: org.rwshop/org.rwshop.nb.animation
@Override
public void componentOpened() {
result = Utilities.actionsGlobalContext().lookupResult(AnimationNode.class);
result.allItems();
result.addLookupListener (this);
}
代码示例来源:origin: net.sourceforge.javydreamercsw/Client-UI
@Override
public void actionPerformed(ActionEvent e) {
/* Create and display the dialog */
component.setEdit(true);
component.setRequirement(Utilities.actionsGlobalContext().lookup(Requirement.class));
component.open();
component.requestActive();
}
}
代码示例来源:origin: net.sourceforge.javydreamercsw/Client-UI
@Override
public void componentOpened() {
result = Utilities.actionsGlobalContext().lookupResult(Object.class);
result.allItems();
result.addLookupListener(this);
}
内容来源于网络,如有侵权,请联系作者删除!