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


Java JLabel.WEST属性代码示例

本文整理汇总了Java中javax.swing.JLabel.WEST属性的典型用法代码示例。如果您正苦于以下问题:Java JLabel.WEST属性的具体用法?Java JLabel.WEST怎么用?Java JLabel.WEST使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.swing.JLabel的用法示例。


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

示例1: createLayout

private mxIGraphLayout createLayout(final String ident, final boolean animate) {
  if (ident != null) {
    if (ident.equals("verticalHierarchical")) {
      this.layout = new mxHierarchicalLayout(StaticEditorManager.graph);
    } else if (ident.equals("horizontalHierarchical")) {
      this.layout = new mxHierarchicalLayout(StaticEditorManager.graph, JLabel.WEST);
    }
  }
  return this.layout;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:10,代码来源:GraphUtil.java

示例2: createLayout

private static mxIGraphLayout createLayout(
		final WorkflowGraphLayoutType layout,
		final mxGraphComponent graphComponent, final boolean animate) {
	mxIGraphLayout newLayout = null;

	if (layout != null) {
		final mxGraph graph = graphComponent.getGraph();

		if (layout.getIdent().equalsIgnoreCase("verticalHierarchical")) {
			newLayout = new mxHierarchicalLayout(graph);
		} else if (layout.getIdent().equalsIgnoreCase(
				"horizontalHierarchical")) {
			newLayout = new mxHierarchicalLayout(graph, JLabel.WEST);
		} else if (layout.getIdent().equalsIgnoreCase("verticalTree")) {
			newLayout = new mxCompactTreeLayout(graph, false);
		} else if (layout.getIdent().equalsIgnoreCase("horizontalTree")) {
			newLayout = new mxCompactTreeLayout(graph, true);
		} else if (layout.getIdent().equalsIgnoreCase("parallelEdges")) {
			newLayout = new mxParallelEdgeLayout(graph);
		} else if (layout.getIdent().equalsIgnoreCase("placeEdgeLabels")) {
			newLayout = new mxEdgeLabelLayout(graph);
		} else if (layout.getIdent().equalsIgnoreCase("organicLayout")) {
			newLayout = new mxOrganicLayout(graph);
		}
		if (layout.getIdent().equalsIgnoreCase("verticalPartition")) {
			newLayout = new mxPartitionLayout(graph, false) {
				/**
				 * Overrides the empty implementation to return the size of
				 * the graph control.
				 */
				@Override
				public mxRectangle getContainerSize() {
					return graphComponent.getLayoutAreaSize();
				}
			};
		} else if (layout.getIdent()
				.equalsIgnoreCase("horizontalPartition")) {
			newLayout = new mxPartitionLayout(graph, true) {
				/**
				 * Overrides the empty implementation to return the size of
				 * the graph control.
				 */
				@Override
				public mxRectangle getContainerSize() {
					return graphComponent.getLayoutAreaSize();
				}
			};
		} else if (layout.getIdent().equalsIgnoreCase("verticalStack")) {
			newLayout = new mxStackLayout(graph, false) {
				/**
				 * Overrides the empty implementation to return the size of
				 * the graph control.
				 */
				@Override
				public mxRectangle getContainerSize() {
					return graphComponent.getLayoutAreaSize();
				}
			};
		} else if (layout.getIdent().equalsIgnoreCase("horizontalStack")) {
			newLayout = new mxStackLayout(graph, true) {
				/**
				 * Overrides the empty implementation to return the size of
				 * the graph control.
				 */
				@Override
				public mxRectangle getContainerSize() {
					return graphComponent.getLayoutAreaSize();
				}
			};
		} else if (layout.getIdent().equalsIgnoreCase("circleLayout")) {
			newLayout = new mxCircleLayout(graph);
		}
	}

	return newLayout;
}
 
开发者ID:roscisz,项目名称:KernelHive,代码行数:76,代码来源:WorkflowEditor.java

示例3: createLayout

/**
 * Creates a layout instance for the given identifier.
 */
protected mxIGraphLayout createLayout(String ident, boolean animate) {
  mxIGraphLayout layout = null;

  if (ident != null) {
    mxGraph graph = graphComponent.getGraph();

    if (ident.equals("verticalHierarchical")) {
      layout = new mxHierarchicalLayout(graph);
    } else if (ident.equals("horizontalHierarchical")) {
      layout = new mxHierarchicalLayout(graph, JLabel.WEST);
    } else if (ident.equals("verticalTree")) {
      layout = new mxCompactTreeLayout(graph, false);
    } else if (ident.equals("horizontalTree")) {
      layout = new mxCompactTreeLayout(graph, true);
    } else if (ident.equals("parallelEdges")) {
      layout = new mxParallelEdgeLayout(graph);
    } else if (ident.equals("placeEdgeLabels")) {
      layout = new mxEdgeLabelLayout(graph);
    } else if (ident.equals("organicLayout")) {
      layout = new mxOrganicLayout(graph);
    }
    if (ident.equals("verticalPartition")) {
      layout = new mxPartitionLayout(graph, false) {
        /**
         * Overrides the empty implementation to return the size of the graph control.
         */
        public mxRectangle getContainerSize() {
          return graphComponent.getLayoutAreaSize();
        }
      };
    } else if (ident.equals("horizontalPartition")) {
      layout = new mxPartitionLayout(graph, true) {
        /**
         * Overrides the empty implementation to return the size of the graph control.
         */
        public mxRectangle getContainerSize() {
          return graphComponent.getLayoutAreaSize();
        }
      };
    } else if (ident.equals("verticalStack")) {
      layout = new mxStackLayout(graph, false) {
        /**
         * Overrides the empty implementation to return the size of the graph control.
         */
        public mxRectangle getContainerSize() {
          return graphComponent.getLayoutAreaSize();
        }
      };
    } else if (ident.equals("horizontalStack")) {
      layout = new mxStackLayout(graph, true) {
        /**
         * Overrides the empty implementation to return the size of the graph control.
         */
        public mxRectangle getContainerSize() {
          return graphComponent.getLayoutAreaSize();
        }
      };
    } else if (ident.equals("circleLayout")) {
      layout = new mxCircleLayout(graph);
    }
  }

  return layout;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:67,代码来源:BasicGraphEditor.java


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