📄 title.java
字号:
package jmathlib.toolbox.jmathlib.graphics;
import jmathlib.core.tokens.*;
import jmathlib.core.functions.ExternalFunction;
/**Add text to the title of the current axes*/
public class title extends ExternalFunction
{
public OperandToken evaluate(Token[] operands)
{
//ErrorLogger.debugLine("title: evaluate");
if (getNArgIn(operands) != 1)
throwMathLibException("title: number of arguments != 1");
if (!(operands[0] instanceof CharToken))
throwMathLibException("title: argument must be a string");
String title = ((CharToken)operands[0]).toString();
getGraphicsManager().getCurrentFigure().getCurrentAxes().setTitle(title);
getGraphicsManager().getCurrentFigure().repaint();
return null;
}
}
/*
@GROUP
graphics
@SYNTAX
title(title-string)
@DOC
Displays a title on a graph
@EXAMPLES
<programlisting>
title("graph title")
</programlisting>
@NOTES
@SEE
xlabel, ylabel, zlabel
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -