/**
*
*/
public void actionPerformed(ActionEvent e)
{
if (e.getSource() instanceof mxGraphComponent)
{
mxGraphComponent graphComponent = (mxGraphComponent) e
.getSource();
double scale = this.scale;
if (scale == 0)
{
String value = (String) JOptionPane.showInputDialog(
graphComponent, mxResources.get("value"),
mxResources.get("scale") + " (%)",
JOptionPane.PLAIN_MESSAGE, null, null, "");
if (value != null)
{
scale = Double.parseDouble(value.replace("%", "")) / 100;
}
}
if (scale > 0)
{
graphComponent.zoomTo(scale, graphComponent.isCenterZoom());
}
}
}
EditorActions.java 文件源码
java
阅读 32
收藏 0
点赞 0
评论 0
项目:Tarski
作者:
评论列表
文章目录