Java Code Examples for javax.swing.JLabel.WEST

The following are Jave code examples for showing how to use WEST of the javax.swing.JLabel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: Tarski   File: GraphUtil.java   Source Code and License Vote up 5 votes
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;
}
 
Example 2
Project: KernelHive   File: WorkflowEditor.java   Source Code and License Vote up 4 votes
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;
}
 
Example 3
Project: Tarski   File: BasicGraphEditor.java   Source Code and License Vote up 4 votes
/**
 * 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;
}