当前位置: 首页>>代码示例>>Java>>正文


Java GridLayer类代码示例

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


GridLayer类属于org.eclipse.gef.editparts包,在下文中一共展示了GridLayer类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createGridLayer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected GridLayer createGridLayer() {
    return new PagableGridLayer();
}
 
开发者ID:roundrop,项目名称:ermasterr,代码行数:8,代码来源:PagableFreeformRootEditPart.java

示例2: createGridLayer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
protected GridLayer createGridLayer() {
	return new PagableGridLayer();
}
 
开发者ID:kozake,项目名称:ermaster-k,代码行数:8,代码来源:PagableFreeformRootEditPart.java

示例3: createGridLayer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
protected GridLayer createGridLayer() {
	GridLayer gl = new GridLayer();
	gl.setForegroundColor( new Color(null, 180, 180, 255));
	return gl;
}
 
开发者ID:ShoukriKattan,项目名称:ForgedUI-Eclipse,代码行数:6,代码来源:GridScalableFreeformRootEditPart.java

示例4: configureGraphicalViewer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
/**
 * Override this to enforce that connections can also be selected with a mouse drag marquee selection.
 */
@Override
protected void configureGraphicalViewer() {

  ScrollingGraphicalViewer viewer = (ScrollingGraphicalViewer) getDiagramContainer().getGraphicalViewer();

  ScalableRootEditPartAnimated rootEditPart = new ScalableRootEditPartAnimated(viewer, getConfigurationProvider()) {
    @Override
    protected GridLayer createGridLayer() {
      return new org.eclipse.graphiti.ui.internal.util.draw2d.GridLayer((IConfigurationProviderInternal) getConfigurationProvider());
    }

    @Override
    public DragTracker getDragTracker(Request req) {
      GFMarqueeDragTracker trckr = new GFMarqueeDragTracker(this);
      trckr.setMarqueeBehavior(GFMarqueeSelectionTool.BEHAVIOR_NODES_AND_CONNECTIONS);
      return trckr;
    }
  };

  // configure ZoomManager
  viewer.setRootEditPart(rootEditPart); // support

  // animation of the zoom
  ZoomManager zoomManager = rootEditPart.getZoomManager();
  List<String> zoomLevels = new ArrayList<>(3);
  zoomLevels.add(ZoomManager.FIT_ALL);
  zoomLevels.add(ZoomManager.FIT_WIDTH);
  zoomLevels.add(ZoomManager.FIT_HEIGHT);
  zoomManager.setZoomLevelContributions(zoomLevels);
  IToolBehaviorProvider toolBehaviorProvider = getConfigurationProvider().getDiagramTypeProvider().getCurrentToolBehaviorProvider();
  zoomManager.setZoomLevels(toolBehaviorProvider.getZoomLevels());

  this.initActionRegistry(zoomManager);

  // set the keyhandler.
  viewer.setKeyHandler((new GraphicalViewerKeyHandler(viewer)).setParent(getCommonKeyHandler()));

  // settings for grid and guides
  Diagram diagram = getConfigurationProvider().getDiagram();

  boolean snapToGrid = diagram.isSnapToGrid();
  int horizontalGridUnit = diagram.getGridUnit();
  int verticalGridUnit = diagram.getVerticalGridUnit();
  if (verticalGridUnit == -1) {
    // No vertical grid unit set (or old diagram before 0.8): use
    // vertical grid unit
    verticalGridUnit = horizontalGridUnit;
  }
  boolean gridVisisble = (horizontalGridUnit > 0) && (verticalGridUnit > 0);

  viewer.setProperty(SnapToGrid.PROPERTY_GRID_VISIBLE, new Boolean(gridVisisble));
  viewer.setProperty(SnapToGrid.PROPERTY_GRID_ENABLED, new Boolean(snapToGrid));
  viewer.setProperty(SnapToGrid.PROPERTY_GRID_SPACING, new Dimension(horizontalGridUnit, verticalGridUnit));
  viewer.setProperty(SnapToGeometry.PROPERTY_SNAP_ENABLED, toolBehaviorProvider.isShowGuides());

  // context button manager
  IConfigurationProviderInternal configurationProvider = (IConfigurationProviderInternal) this.getConfigurationProvider();
  configurationProvider.setContextButtonManager(new ContextButtonManagerForPad(this, configurationProvider.getResourceRegistry()));
}
 
开发者ID:eclipse,项目名称:triquetrum,代码行数:63,代码来源:TriqDiagramBehavior.java

示例5: createGridLayer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
@Override
protected GridLayer createGridLayer() {
	return new com.jaspersoft.studio.editor.gef.figures.layers.GridLayer();
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:5,代码来源:SQLDesignerRootEditPart.java

示例6: createGridLayer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
@Override
protected GridLayer createGridLayer() {
    return new PagableGridLayer();
}
 
开发者ID:dbflute-session,项目名称:erflute,代码行数:5,代码来源:PagableFreeformRootEditPart.java

示例7: createGridLayer

import org.eclipse.gef.editparts.GridLayer; //导入依赖的package包/类
/**
 * Creates a {@link GridLayer grid}. Sub-classes can override this method to
 * customize the appearance of the grid. The grid layer should be the first
 * layer (i.e., beneath the primary layer) if it is not to cover up parts on
 * the primary layer. In that case, the primary layer should be transparent
 * so that the grid is visible.
 * 
 * @return the newly created GridLayer
 */
protected GridLayer createGridLayer( )
{
	GridLayer grid = new TableGridLayer( this );
	grid.setOpaque( false );
	return grid;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:16,代码来源:TableEditPart.java


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