• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java AlignCellsAction类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.mxgraph.examples.swing.editor.EditorActions.AlignCellsAction的典型用法代码示例。如果您正苦于以下问题:Java AlignCellsAction类的具体用法?Java AlignCellsAction怎么用?Java AlignCellsAction使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AlignCellsAction类属于com.mxgraph.examples.swing.editor.EditorActions包,在下文中一共展示了AlignCellsAction类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: populateShapeMenu

import com.mxgraph.examples.swing.editor.EditorActions.AlignCellsAction; //导入依赖的package包/类
/**
 * Adds menu items to the given shape menu. This is factored out because
 * the shape menu appears in the menubar and also in the popupmenu.
 */
public static void populateShapeMenu(JMenu menu, BasicGraphEditor editor)
{
	menu.add(editor.bind(mxResources.get("home"), mxGraphActions.getHomeAction(), "/com/mxgraph/examples/swing/images/house.gif"));

	menu.addSeparator();

	menu.add(editor.bind(mxResources.get("exitGroup"), mxGraphActions.getExitGroupAction(), "/com/mxgraph/examples/swing/images/up.gif"));
	menu.add(editor.bind(mxResources.get("enterGroup"), mxGraphActions.getEnterGroupAction(),
			"/com/mxgraph/examples/swing/images/down.gif"));

	menu.addSeparator();

	menu.add(editor.bind(mxResources.get("group"), mxGraphActions.getGroupAction(), "/com/mxgraph/examples/swing/images/group.gif"));
	menu.add(editor.bind(mxResources.get("ungroup"), mxGraphActions.getUngroupAction(),
			"/com/mxgraph/examples/swing/images/ungroup.gif"));

	menu.addSeparator();

	menu.add(editor.bind(mxResources.get("removeFromGroup"), mxGraphActions.getRemoveFromParentAction()));

	menu.add(editor.bind(mxResources.get("updateGroupBounds"), mxGraphActions.getUpdateGroupBoundsAction()));

	menu.addSeparator();

	menu.add(editor.bind(mxResources.get("collapse"), mxGraphActions.getCollapseAction(),
			"/com/mxgraph/examples/swing/images/collapse.gif"));
	menu.add(editor.bind(mxResources.get("expand"), mxGraphActions.getExpandAction(), "/com/mxgraph/examples/swing/images/expand.gif"));

	menu.addSeparator();

	menu.add(editor.bind(mxResources.get("toBack"), mxGraphActions.getToBackAction(), "/com/mxgraph/examples/swing/images/toback.gif"));
	menu.add(editor.bind(mxResources.get("toFront"), mxGraphActions.getToFrontAction(),
			"/com/mxgraph/examples/swing/images/tofront.gif"));

	menu.addSeparator();

	JMenu submenu = (JMenu) menu.add(new JMenu(mxResources.get("align")));

	submenu.add(editor.bind(mxResources.get("left"), new AlignCellsAction(mxConstants.ALIGN_LEFT),
			"/com/mxgraph/examples/swing/images/alignleft.gif"));
	submenu.add(editor.bind(mxResources.get("center"), new AlignCellsAction(mxConstants.ALIGN_CENTER),
			"/com/mxgraph/examples/swing/images/aligncenter.gif"));
	submenu.add(editor.bind(mxResources.get("right"), new AlignCellsAction(mxConstants.ALIGN_RIGHT),
			"/com/mxgraph/examples/swing/images/alignright.gif"));

	submenu.addSeparator();

	submenu.add(editor.bind(mxResources.get("top"), new AlignCellsAction(mxConstants.ALIGN_TOP),
			"/com/mxgraph/examples/swing/images/aligntop.gif"));
	submenu.add(editor.bind(mxResources.get("middle"), new AlignCellsAction(mxConstants.ALIGN_MIDDLE),
			"/com/mxgraph/examples/swing/images/alignmiddle.gif"));
	submenu.add(editor.bind(mxResources.get("bottom"), new AlignCellsAction(mxConstants.ALIGN_BOTTOM),
			"/com/mxgraph/examples/swing/images/alignbottom.gif"));

	menu.addSeparator();

	menu.add(editor.bind(mxResources.get("autosize"), new AutosizeAction()));

}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:64,代码来源:EditorMenuBar.java


示例2: populateShapeMenu

import com.mxgraph.examples.swing.editor.EditorActions.AlignCellsAction; //导入依赖的package包/类
/**
 * Adds menu items to the given shape menu. This is factored out because the shape menu appears in
 * the menubar and also in the popupmenu.
 */
public static void populateShapeMenu(JMenu menu, BasicGraphEditor editor) {
  menu.add(editor.bind(mxResources.get("home"), mxGraphActions.getHomeAction(),
      "/com/mxgraph/examples/swing/images/house.gif"));

  menu.addSeparator();

  menu.add(editor.bind(mxResources.get("exitGroup"), mxGraphActions.getExitGroupAction(),
      "/com/mxgraph/examples/swing/images/up.gif"));
  menu.add(editor.bind(mxResources.get("enterGroup"), mxGraphActions.getEnterGroupAction(),
      "/com/mxgraph/examples/swing/images/down.gif"));

  menu.addSeparator();

  menu.add(editor.bind(mxResources.get("group"), mxGraphActions.getGroupAction(),
      "/com/mxgraph/examples/swing/images/group.gif"));
  menu.add(editor.bind(mxResources.get("ungroup"), mxGraphActions.getUngroupAction(),
      "/com/mxgraph/examples/swing/images/ungroup.gif"));

  menu.addSeparator();

  menu.add(editor.bind(mxResources.get("removeFromGroup"),
      mxGraphActions.getRemoveFromParentAction()));

  menu.add(editor.bind(mxResources.get("updateGroupBounds"),
      mxGraphActions.getUpdateGroupBoundsAction()));

  menu.addSeparator();

  menu.add(editor.bind(mxResources.get("collapse"), mxGraphActions.getCollapseAction(),
      "/com/mxgraph/examples/swing/images/collapse.gif"));
  menu.add(editor.bind(mxResources.get("expand"), mxGraphActions.getExpandAction(),
      "/com/mxgraph/examples/swing/images/expand.gif"));

  menu.addSeparator();

  menu.add(editor.bind(mxResources.get("toBack"), mxGraphActions.getToBackAction(),
      "/com/mxgraph/examples/swing/images/toback.gif"));
  menu.add(editor.bind(mxResources.get("toFront"), mxGraphActions.getToFrontAction(),
      "/com/mxgraph/examples/swing/images/tofront.gif"));

  menu.addSeparator();

  JMenu submenu = (JMenu) menu.add(new JMenu(mxResources.get("align")));

  submenu.add(editor.bind(mxResources.get("left"), new AlignCellsAction(mxConstants.ALIGN_LEFT),
      "/com/mxgraph/examples/swing/images/alignleft.gif"));
  submenu
      .add(editor.bind(mxResources.get("center"), new AlignCellsAction(mxConstants.ALIGN_CENTER),
          "/com/mxgraph/examples/swing/images/aligncenter.gif"));
  submenu.add(editor.bind(mxResources.get("right"), new AlignCellsAction(mxConstants.ALIGN_RIGHT),
      "/com/mxgraph/examples/swing/images/alignright.gif"));

  submenu.addSeparator();

  submenu.add(editor.bind(mxResources.get("top"), new AlignCellsAction(mxConstants.ALIGN_TOP),
      "/com/mxgraph/examples/swing/images/aligntop.gif"));
  submenu
      .add(editor.bind(mxResources.get("middle"), new AlignCellsAction(mxConstants.ALIGN_MIDDLE),
          "/com/mxgraph/examples/swing/images/alignmiddle.gif"));
  submenu
      .add(editor.bind(mxResources.get("bottom"), new AlignCellsAction(mxConstants.ALIGN_BOTTOM),
          "/com/mxgraph/examples/swing/images/alignbottom.gif"));

  menu.addSeparator();

  menu.add(editor.bind(mxResources.get("autosize"), new AutosizeAction()));

}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:73,代码来源:EditorMenuBar.java



注:本文中的com.mxgraph.examples.swing.editor.EditorActions.AlignCellsAction类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java RpcScheduler类代码示例发布时间:2022-05-22
下一篇:
Java StorageErrorCode类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap