当前位置: 首页>>代码示例>>Java>>正文


Java EditorRegistry.addPropertyChangeListener方法代码示例

本文整理汇总了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();
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:32,代码来源:GotoBookmarkAction.java

示例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);
        }
    });
    
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:20,代码来源:EditorContextDispatcher.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:13,代码来源:Install.java

示例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();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:HintAction.java

示例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);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:12,代码来源:ToggleBookmarkAction.java

示例6: EditorRegistryListener

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private EditorRegistryListener () {
    EditorRegistry.addPropertyChangeListener(new PropertyChangeListener() {
        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            editorRegistryChanged();
        }
    });
    editorRegistryChanged();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:EventSupport.java

示例7: getNavigatorUI

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
protected  AbstractXMLNavigatorContent getNavigatorUI() {
if (navigator == null) {
    navigator = new NavigatorContent();
           EditorRegistry.addPropertyChangeListener(navigator);
}
return navigator;
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:XMLNavigatorPanel.java

示例8: OpenedEditors

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private OpenedEditors() {
    EditorRegistry.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent evt) {
            stateChanged();
        }
    });
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:OpenedEditors.java

示例9: createListener

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private void createListener() {
  EditorRegistry.addPropertyChangeListener((PropertyChangeEvent evt) -> {
    updateComponent();
  });
}
 
开发者ID:maumss,项目名称:file-type-plugin,代码行数:6,代码来源:FileType.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:NextErrorAction.java

示例11: EditorRegistryWatcher

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
private EditorRegistryWatcher() {
    EditorRegistry.addPropertyChangeListener(this);
    activeTextComponentRef = new WeakReference<JTextComponent>(EditorRegistry.focusedComponent());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:EditorRegistryWatcher.java

示例12: restored

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public @Override void restored () {
    EditorRegistry.addPropertyChangeListener(editorsTracker);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:4,代码来源:CodeTemplatesModule.java

示例13: GsfFoldScheduler

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public GsfFoldScheduler() {
    setEditor (EditorRegistry.focusedComponent ());
    EditorRegistry.addPropertyChangeListener (new AListener ());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:GsfFoldScheduler.java

示例14: BreadCrumbsScheduler

import org.netbeans.api.editor.EditorRegistry; //导入方法依赖的package包/类
public BreadCrumbsScheduler () {
    EditorRegistry.addPropertyChangeListener (new EditorListener ());
    setEditor (EditorRegistry.focusedComponent ());
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:5,代码来源:BreadCrumbsScheduler.java

示例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));
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:6,代码来源:CaretListeningFactory.java


注:本文中的org.netbeans.api.editor.EditorRegistry.addPropertyChangeListener方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。