本文整理了Java中java.beans.EventHandler.create()
方法的一些代码示例,展示了EventHandler.create()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。EventHandler.create()
方法的具体详情如下:
包路径:java.beans.EventHandler
类名称:EventHandler
方法名:create
暂无
代码示例来源:origin: org.orbisgis/orbisgis-omanager
/**
* @param bundleContext Bundle context to track.
*/
public BundleListModel(BundleContext bundleContext, RepositoryAdminTracker repositoryAdminTrackerCustomizer) {
this.bundleContext = bundleContext;
this.repositoryAdminTrackerCustomizer = repositoryAdminTrackerCustomizer;
repositoryAdminTrackerCustomizer.getPropertyChangeSupport().
addPropertyChangeListener(EventHandler.create(PropertyChangeListener.class,this,"update"));
}
代码示例来源:origin: org.orbisgis/orbisgis-view
/**
* Init listeners
* @return
*/
public ProxyPreferenceModel initListeners() {
//useProxy.addPreferenceListener(EventHandler.create(PreferenceListener.class, this,"onChangeUseProxy",""));
proxyPort.addPreferenceListener(EventHandler.create(StringPreferenceListener.class, this,"onUserSetProxyPort",""));
return this;
}
代码示例来源:origin: org.orbisgis/orbisgis-view
public CDropDownButtonExt(Action action) {
this.action = action;
// Read properties from the action
onActionPropertyChange(new PropertyChangeEvent(action,null,null,null));
// Listen to action property changes
action.addPropertyChangeListener(
EventHandler.create(PropertyChangeListener.class, this, "onActionPropertyChange", ""));
}
代码示例来源:origin: org.orbisgis/orbisgis-view
public CToggleButton(Action action) {
this.action = action;
// Read properties from the action
onActionPropertyChange(new PropertyChangeEvent(action,null,null,null));
// Listen to action property changes
action.addPropertyChangeListener(
EventHandler.create(PropertyChangeListener.class, this, "onActionPropertyChange", ""));
}
代码示例来源:origin: org.orbisgis/orbisgis-omanager-plugin
public List<Action> createActions(MainWindow target) {
this.target = target;
List<Action> actions = new ArrayList<>();
actions.add(new DefaultAction(MENU_MANAGE_PLUGINS,I18N.tr("&Manage plugins"),
new ImageIcon(ManagerMenuFactory.class.getResource("panel_icon.png")),
EventHandler.create(ActionListener.class,this,"showManager")).setParent(MENU_TOOLS).setInsertFirst(true));
return actions;
}
代码示例来源:origin: org.orbisgis/orbisgis-view
private void initialize(JTable list) {
updateLFRenderer();
list.addPropertyChangeListener("UI",
EventHandler.create(PropertyChangeListener.class,this,"updateLFRenderer"));
}
}
代码示例来源:origin: org.orbisgis/orbisgis-omanager
private void initialize(JList list) {
updateLFRenderer();
list.addPropertyChangeListener("UI",
EventHandler.create(PropertyChangeListener.class, this, "updateLFRenderer"));
}
}
代码示例来源:origin: org.orbisgis/mapeditor
/**
* The server list will keep this instance updated
* @param mapsManagerPersistence
*/
public void setMapsManagerPersistence(MapsManagerPersistence mapsManagerPersistence) {
this.mapsManagerPersistence = mapsManagerPersistence;
// Install listeners
mapsManagerPersistence.addPropertyChangeListener(MapsManagerPersistence.PROP_SERVER_URI_LIST, EventHandler.create(PropertyChangeListener.class, this, "onMapServerListUpdate"));
onMapServerListUpdate();
}
private void updateServerList() {
代码示例来源:origin: org.orbisgis/orbisgis-view
private void initialize(JTree tree) {
updateLFRenderer();
tree.addPropertyChangeListener("UI",
EventHandler.create(PropertyChangeListener.class,this,"updateLFRenderer"));
}
代码示例来源:origin: org.orbisgis/mapeditor
@Override
public void feedPopupMenu(JPopupMenu menu) {
if(!loaded) {
JMenuItem openMapItem = new JMenuItem(I18N.tr("Open the map"), MapEditorIcons.getIcon("open_map"));
openMapItem.addActionListener(EventHandler.create(ActionListener.class,this,"onOpenMap"));
openMapItem.setActionCommand("TreeNodeMapElement:OpenMap");
MenuCommonFunctions.updateOrInsertMenuItem(menu, openMapItem);
}
}
代码示例来源:origin: org.orbisgis/orbisgis-view
public OutputPanel() {
changeAttribute(lastColor); //Init attribute
this.setLayout(new BorderLayout());
textPane = new JTextPane();
textPane.setEditable(false);
textPane.setComponentPopupMenu(makePopupMenu());
this.add(new JScrollPane(textPane), BorderLayout.CENTER);
this.addPropertyChangeListener("UI",
EventHandler.create(PropertyChangeListener.class, this, "resetFont"));
}
代码示例来源:origin: org.orbisgis/mapeditor
/**
* The server list will keep this instance updated
* @param mapsManagerPersistence
*/
public void setMapsManagerPersistence(MapsManagerPersistence mapsManagerPersistence) {
this.mapsManagerPersistence = mapsManagerPersistence;
// Track property change
mapsManagerPersistence.addPropertyChangeListener(MapsManagerPersistence.PROP_FOLDER_LIST,
EventHandler.create(PropertyChangeListener.class, this, "onFolderListPropertyChange","newValue"));
onFolderListPropertyChange(mapsManagerPersistence.getMapCatalogFolderList());
}
代码示例来源:origin: org.orbisgis/toc
@Override
public void initPreview() {
fallbackPreview = new CanvasSE(getFallbackSymbolizer());
MouseListener l = EventHandler.create(MouseListener.class, this, "onEditFallback", "", "mouseClicked");
fallbackPreview.addMouseListener(l);
}
代码示例来源:origin: org.orbisgis/orbisgis-view
/**
* Attach listeners to the BackgroundManager
* @return itself
*/
public JobListModel listenToBackgroundManager() {
BackgroundManager bm = Services.getService(BackgroundManager.class);
//bm.addBackgroundListener(EventHandler.create(BackgroundListener.class,this,"onJobListChange"));
bm.addBackgroundListener(new JobListBackgroundListener());
labelUpdateListener = EventHandler.create(PropertyChangeListener.class, this, "onJobItemLabelChange","source");
return this;
}
代码示例来源:origin: org.orbisgis/toc
@Override
public void initPreview() {
fallbackPreview = new CanvasSE(getFallbackSymbolizer());
MouseListener l = EventHandler.create(MouseListener.class, this, "onEditFallback", "", "mouseClicked");
fallbackPreview.addMouseListener(l);
}
代码示例来源:origin: org.orbisgis/mapeditor
@Override
public void feedPopupMenu(JPopupMenu menu) {
JMenuItem addServer = new JMenuItem(I18N.tr("Add Map Catalog folder"),
MapEditorIcons.getIcon("folder_add"));
addServer.setToolTipText(I18N.tr("Add link to a local folder"));
addServer.setActionCommand("TreeNodeLocalRoot:addFolder");
addServer.addActionListener(
EventHandler.create(ActionListener.class,
this, "onAddFolder"));
MenuCommonFunctions.updateOrInsertMenuItem(menu, addServer);
}
代码示例来源:origin: org.orbisgis/mapeditor
@Override
public void feedPopupMenu(JPopupMenu menu) {
JMenuItem remove = new JMenuItem(I18N.tr("Delete"),
MapEditorIcons.getIcon("remove"));
remove.setToolTipText(I18N.tr("Remove this map on the server"));
remove.setActionCommand("delete");
remove.addActionListener(
EventHandler.create(ActionListener.class,
this, "onDeleteMap"));
MenuCommonFunctions.updateOrInsertMenuItem(menu, remove);
}
}
代码示例来源:origin: org.orbisgis/orbisgis-view
private void launchSortProcess(SortKey sortInformation) {
SortJob sortJob = new SortJob(sortInformation, model, viewToModel, dataSource);
sortJob.getEventSortedListeners().addListener(this, EventHandler.create(SortJob.SortJobListener.class,this,"onRowSortDone",""));
launchJob(sortJob);
}
代码示例来源:origin: org.orbisgis/mapeditor
public void addResultSetProviderFactory(ResultSetProviderFactory resultSetProviderFactory) {
Action rsAction = new DefaultAction("RSF_"+resultSetProviderFactory.getName(),
resultSetProviderFactory.getName(),null,
EventHandler.create(ActionListener.class, this, "onChangeRendererData", ""))
.setMenuGroup(true).setParent(MapEditorAction.A_DATA_PROVIDERS)
.setButtonGroup(MapEditorAction.TOGGLE_GROUP_DATA_PROVIDERS);
rsFactories.put(resultSetProviderFactory, rsAction);
actions.addAction(rsAction);
}
代码示例来源:origin: org.orbisgis/orbisgis-view
private void makeJobList() {
jobList = new JobListPanel();
jobListRender = new JobListCellRenderer();
jobList.setRenderer(jobListRender);
jobListModel = new JobListModel().listenToBackgroundManager();
jobList.setModel(jobListModel);
jobList.getModel().addListDataListener(EventHandler.create(ListDataListener.class,this,"onListContentChanged"));
}
内容来源于网络,如有侵权,请联系作者删除!