zoukankan      html  css  js  c++  java
  • Netbeans自定义mode

    1 在模块根目录下编辑mode文件,例如chatEditor.wsmode

    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE mode PUBLIC
              "-//NetBeans//DTD Mode Properties 2.1//EN"
              "http://www.netbeans.org/dtds/mode-properties2_1.dtd">

    <mode version="2.1">
        <name unique="chatEditor" />
        <kind type="editor" />
        <state type="separated" />
        <bounds x="50" y="50" width="536" height="436" />
        <constraints>
        </constraints>
        <empty-behavior permanent="true" />
    </mode>

    2 在layer.xml中注册

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
    <filesystem>
        <folder name="Windows2">
            <folder name="Modes">
                <file name="chatEditor.wsmode" url="chatEditor.wsmode"/>
            </folder>
        </folder>
    </filesystem>

    3 调用

    Mode mode = TCManager.getChatEditorMode();
    if(mode != null) {
        mode.dockInto(win);
    }
    win.setName(name);   // 必须在EDT线程调用
    if (!win.isOpened()) {
        win.open();
    }
  • 相关阅读:
    ORACLE查询删除重复记录三种方法
    是否可以从一个static方法内部发出对非static方法的调用
    协程(微线程)
    多线程、多进程
    python3.6.5修改print的颜色
    Python之时间和日期模块
    Python之字符(2)
    Python之字符
    python之列表
    Python中的文件操作
  • 原文地址:https://www.cnblogs.com/cuizhf/p/2216337.html
Copyright © 2011-2022 走看看