本文整理汇总了Java中org.netbeans.api.editor.EditorRegistry.addPropertyChangeListener方法的典型用法代码示例。如果您正苦于以下问题:Java EditorRegistry.addPropertyChangeListener方法的具体用法?Java EditorRegistry.addPropertyChangeListener怎么用?Java EditorRegistry.addPropertyChangeListener使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.netbeans.api.editor.EditorRegistry
的用法示例。
在下文中一共展示了EditorRegistry.addPropertyChangeListener方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: GotoBookmarkAction
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
/**
* Construct new goto bookmark action.
*
* @param gotoNext <code>true</code> if this action should go to a next bookmark.
* <code>false</code> if this action should go to a previous bookmark.
* @param select whether the selection should extend from the current
* caret location to the bookmark.
*/
public GotoBookmarkAction(boolean gotoNext, boolean select) {
super(gotoNext ? GOTO_NEXT_NAME : GOTO_PREVIOUS_NAME,
MAGIC_POSITION_RESET | UNDO_MERGE_RESET | WORD_MATCH_RESET
);
this.gotoNext = gotoNext;
this.select = select;
putValue(BaseAction.ICON_RESOURCE_PROPERTY,
gotoNext
? "org/netbeans/modules/editor/bookmarks/resources/next_bookmark.png" // NOI18N
: "org/netbeans/modules/editor/bookmarks/resources/previous_bookmark.png" // NOI18N
);
updateEnabled();
EditorRegistry.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
updateEnabled();
}
});
}
示例2: EditorContextDispatcher
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private EditorContextDispatcher() {
refreshProcessor = new RequestProcessor("Refresh Editor Context", 1); // NOI18N
resFileObject = Utilities.actionsGlobalContext().lookupResult(FileObject.class);
EditorLookupListener ell = new EditorLookupListener(FileObject.class);
resFileObject.addLookupListener(ell);
ell.lookupChanged(false); // To initialize data
erListener = new EditorRegistryListener();
EditorRegistry.addPropertyChangeListener(WeakListeners.propertyChange(erListener, EditorRegistry.class));
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
// To initialize data:
((EditorRegistryListener) erListener).update(false);
}
});
}
示例3: restored
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public @Override void restored() {
if (!ENABLED) {
return ;
}
Logger log = Logger.getLogger("TIMER"); // NOI18N
log.setUseParentHandlers(false);
log.setLevel(Level.FINE);
log.addHandler(timers);
EditorRegistry.addPropertyChangeListener(docTracker);
}
示例4: HintAction
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
protected HintAction(String key) {
super(key);
putValue("noIconInMenu", Boolean.TRUE); //NOI18N
EditorRegistry.addPropertyChangeListener(WeakListeners.propertyChange(this, TopComponent.getRegistry()));
setEnabled(false);
updateEnabled();
}
示例5: ToggleBookmarkAction
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public ToggleBookmarkAction(JTextComponent component) {
super(
NbBundle.getMessage(ToggleBookmarkAction.class, ACTION_NAME),ImageUtilities.loadImageIcon(ACTION_ICON, false));
putValue(SHORT_DESCRIPTION, Actions.cutAmpersand((String) getValue(NAME)));
putValue("noIconInMenu", Boolean.TRUE); // NOI18N
this.component = component;
updateEnabled();
PropertyChangeListener editorRegistryListener = new EditorRegistryListener(this);
EditorRegistry.addPropertyChangeListener(editorRegistryListener);
}
示例6: EditorRegistryListener
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private EditorRegistryListener () {
EditorRegistry.addPropertyChangeListener(new PropertyChangeListener() {
@Override
public void propertyChange(PropertyChangeEvent evt) {
editorRegistryChanged();
}
});
editorRegistryChanged();
}
示例7: getNavigatorUI
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
protected AbstractXMLNavigatorContent getNavigatorUI() {
if (navigator == null) {
navigator = new NavigatorContent();
EditorRegistry.addPropertyChangeListener(navigator);
}
return navigator;
}
示例8: OpenedEditors
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private OpenedEditors() {
EditorRegistry.addPropertyChangeListener(new PropertyChangeListener() {
public void propertyChange(PropertyChangeEvent evt) {
stateChanged();
}
});
}
示例9: createListener
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private void createListener() {
EditorRegistry.addPropertyChangeListener((PropertyChangeEvent evt) -> {
updateComponent();
});
}
示例10: NextErrorAction
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public NextErrorAction() {
putValue(NAME, NbBundle.getMessage(NextErrorAction.class, "LBL_Next_Error"));
EditorRegistry.addPropertyChangeListener(WeakListeners.propertyChange(this, EditorRegistry.class));
}
示例11: EditorRegistryWatcher
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private EditorRegistryWatcher() {
EditorRegistry.addPropertyChangeListener(this);
activeTextComponentRef = new WeakReference<JTextComponent>(EditorRegistry.focusedComponent());
}
示例12: restored
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public @Override void restored () {
EditorRegistry.addPropertyChangeListener(editorsTracker);
}
示例13: GsfFoldScheduler
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public GsfFoldScheduler() {
setEditor (EditorRegistry.focusedComponent ());
EditorRegistry.addPropertyChangeListener (new AListener ());
}
示例14: BreadCrumbsScheduler
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public BreadCrumbsScheduler () {
EditorRegistry.addPropertyChangeListener (new EditorListener ());
setEditor (EditorRegistry.focusedComponent ());
}
示例15: CaretListeningFactory
import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public CaretListeningFactory() {
super(Phase.RESOLVED, Priority.LOW, TaskIndexingMode.ALLOWED_DURING_SCAN);
INSTANCE = this;
EditorRegistry.addPropertyChangeListener(WeakListeners.propertyChange(this, EditorRegistry.class));
}