textholder.java

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

JAVA
52
字号
/*
 * @(#)TextHolder.java 5.2
 *
 */

package CH.ifa.draw.standard;

import java.awt.*;
import java.util.*;
import CH.ifa.draw.framework.*;

/**
 * The interface of a figure that has some editable text contents.
 * @see Figure
 */

public interface TextHolder {

    public Rectangle textDisplayBox();

    /**
     * Gets the text shown by the text figure.
     */
    public String getText();

    /**
     * Sets the text shown by the text figure.
     */
    public void setText(String newText);

    /**
     * Tests whether the figure accepts typing.
     */
    public boolean acceptsTyping();

    /**
     * Gets the number of columns to be overlaid when the figure is edited.
     */
    public int overlayColumns();

    /**
     * Connects a figure to another figure.
     */
    public void connect(Figure connectedFigure);

    /**
     * Gets the font.
     */
    public Font getFont();

}

⌨️ 快捷键说明

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