clipboard.java

来自「开源(Open Source)项目JHotDraw的文档和源程序」· Java 代码 · 共 43 行

JAVA
43
字号
/*
 * @(#)Clipboard.java 5.2
 *
 */

package CH.ifa.draw.util;

/**
 * A temporary replacement for a global clipboard.
 * It is a singleton that can be used to store and
 * get the contents of the clipboard.
 *
 */
public class Clipboard {
    static Clipboard fgClipboard = new Clipboard();

    /**
     * Gets the clipboard.
     */
    static public Clipboard getClipboard() {
        return fgClipboard;
    }

    private Object fContents;

    private Clipboard() {
    }

    /**
     * Sets the contents of the clipboard.
     */
    public void setContents(Object contents) {
        fContents = contents;
    }

    /**
     * Gets the contents of the clipboard.
     */
    public Object getContents() {
        return fContents;
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?