當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。