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


Java JSplitPane.HORIZONTAL_SPLIT属性代码示例

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


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

示例1: ArrivalRatesPanel

public ArrivalRatesPanel(ArrivalRateParametricAnalysis arpa, ClassDefinition classDef, StationDefinition stationDef, SimulationDefinition simDef) {
	super();
	ARPA = arpa;
	super.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	super.setDividerSize(3);

	DESCRIPTION = "Repeat the simulation with different arrival rate for all open " + "classes.\n\n"
			+ "The 'To' value represents the percentage of the final arrival rate with" + " respect to the initial value.\n\n"
			+ "This option will not be available if there is at least one"
			+ " open class with an interarrival time distribution with infinite or null mean value.\n\n";

	DESCRIPTION_SINGLE = "Repeat the simulation with different arrival rates for an open "
			+ "classes, provided that the interarrival time distribution has a finite, not null, mean value. "
			+ "The 'To' value is the final arrival rate.\n\n ";

	cd = classDef;
	sd = stationDef;
	simd = simDef;
	checker = new ParametricAnalysisChecker(cd, sd, simd);
	initialize();
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:21,代码来源:ArrivalRatesPanel.java

示例2: findFreePosition

private String findFreePosition() {
    int leftTop = 0, rightBottom = 0;
    int orientation = JSplitPane.HORIZONTAL_SPLIT;
	
    for (int i=0, n=getComponentCount(); i < n; i++) {
        LayoutConstraints constraints = getConstraints(i);
        if (!(constraints instanceof SplitConstraints))
            continue;

        int constrPos = convertPosition(constraints);
        if (constrPos == 0)
            leftTop++;
        else if (constrPos == 1)
            rightBottom++;
    }

    if (leftTop == 0 || leftTop < rightBottom)
        return orientation == JSplitPane.HORIZONTAL_SPLIT ?
            JSplitPane.LEFT : JSplitPane.TOP;
    else 
        return orientation == JSplitPane.HORIZONTAL_SPLIT ?
            JSplitPane.RIGHT : JSplitPane.BOTTOM;	
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:23,代码来源:JSplitPaneSupport.java

示例3: init

/**
 * Init the component
 */
private void init() {
	if (!Env.INSTANCE.isOpenGLAvailable()) {
		LOGGER.warn("No graphic card that supports required OpenGL features has been detected. The 3D map will be not be available");
	}
	ToolTipManager.sharedInstance().setInitialDelay(0);
	// init panels
	_statusPanel = new StatusPanel(_services);
	_replayPanel = new ReplayPanel(_services, _statusPanel);
	_controlPanel = new ControlPanel(_services, this, _replayPanel, Env.INSTANCE.isIs3dMap(), Env.INSTANCE.getMode());

	_split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	_rightSplit = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
	_rightPanel = new JPanel(new BorderLayout());
	_rightPanel.add(_rightSplit, BorderLayout.CENTER);
	_rightPanel.add(_statusPanel, BorderLayout.SOUTH);
	_split.setRightComponent(_rightPanel);
	createRightView();
	createMap(false);
	add(_split, BorderLayout.CENTER);

	// add header
	add(_controlPanel, BorderLayout.NORTH);
	resizeSplit();
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:27,代码来源:MainPanel.java

示例4: initComponents

private void initComponents() {
	this.setLayout(new BorderLayout());
	//building mainPanel
	mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setDividerSize(4);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	//layout of main panel
	WarningScrollTable jsp = new WarningScrollTable(joinStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Join Strategies"));
	mainPanel.setResizeWeight(1.0);
	jsp.setMinimumSize(new Dimension(200, 100));
	mainPanel.setLeftComponent(jsp);
	joinEditor.setMinimumSize(new Dimension(225, 100));
	mainPanel.setRightComponent(joinEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:16,代码来源:JoinSectionPanel.java

示例5: setDividerSize

/**
 * overrides to hardcode the size of the divider
 * PENDING(jeff) - rewrite JSplitPane so that this ins't needed
 */
public void setDividerSize(int newSize) {
    Insets          insets = getInsets();
    int             borderSize = 0;
    if (getBasicSplitPaneUI().getOrientation() ==
        JSplitPane.HORIZONTAL_SPLIT) {
        if (insets != null) {
            borderSize = insets.left + insets.right;
        }
    }
    else if (insets != null) {
        borderSize = insets.top + insets.bottom;
    }
    if (newSize < pad + minimumThumbSize + borderSize) {
        setDividerSize(pad + minimumThumbSize + borderSize);
    } else {
        vThumbHeight = hThumbWidth = newSize - pad - borderSize;
        super.setDividerSize(newSize);
    }
}
 
开发者ID:AdoptOpenJDK,项目名称:openjdk-jdk10,代码行数:23,代码来源:MotifSplitPaneDivider.java

示例6: ArrivalRatesPanel

public ArrivalRatesPanel(ArrivalRateParametricAnalysis arpa, ClassDefinition classDef, StationDefinition stationDef, SimulationDefinition simDef) {
	super();
	ARPA = arpa;
	super.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	super.setDividerSize(3);

	DESCRIPTION = "Repeat the simulation with different arrival rate for all open " + "classes.\n\n"
			+ "The 'To' value represents the percentage of the final arrival rate with" + " respect to the initial value.\n\n"
			+ "This option will not be available if there is at least one"
			+ " open class with an interarrival time distribution with infinite or null mean value.\n\n";

	DESCRIPTION_SINGLE = "Repeat the simulation with different arrival rates for an open "
			+ "classes, provided that the interarrival time distribution has a finite, positive, mean value. "
			+ "The 'To' value is the final arrival rate.\n\n ";

	cd = classDef;
	sd = stationDef;
	simd = simDef;
	checker = new ParametricAnalysisChecker(cd, sd, simd);
	initialize();
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:21,代码来源:ArrivalRatesPanel.java

示例7: ViewTreeGroups

public ViewTreeGroups(String directory) {
	//super("JTree FileSystem Viewer - JavaProgrammingForums.com");
	setTitle("GroupsTree Structure");
	fileDetailsTextArea.setEditable(false);
	fileSystemModel = new FileSystemModel(new File(directory));
	fileTree = new JTree(fileSystemModel);
	fileTree.setEditable(true);
	fileTree.addTreeSelectionListener(new TreeSelectionListener() {
		public void valueChanged(TreeSelectionEvent event) {
			File file = (File) fileTree.getLastSelectedPathComponent();
			fileDetailsTextArea.setText(getFileDetails(file));
		}
	});
	JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT,
			true, new JScrollPane(fileTree), new JScrollPane(
					fileDetailsTextArea));
	getContentPane().add(splitPane);
	setDefaultCloseOperation(EXIT_ON_CLOSE);
	setSize(640, 480);
	setVisible(true);
}
 
开发者ID:cyberheartmi9,项目名称:Mona-Secure-Multi-Owner-Data-Sharing-for-Dynamic-Group-in-the-Cloud,代码行数:21,代码来源:ViewTreeGroups.java

示例8: NumberOfCustomersPanel

public NumberOfCustomersPanel(NumberOfCustomerParametricAnalysis ncpa, ClassDefinition classDef, StationDefinition stationDef,
		SimulationDefinition simDef, GuiInterface guiInterface) {
	super();
	super.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	super.setDividerSize(3);
	DESCRIPTION = "Repeat the simulation with different number of jobs in each iteration, "
			+ "starting from the current number of jobs in the closed class.\n\n" + "The proportion of the number of jobs in the different "
			+ "classes will be kept constant, so the number of steps that can be practically executed "
			+ "may be very small (since only integer values are allowed).";
	DESCRIPTION_SINGLE = "Repeat the simulation with different number of jobs in each iteration, "
			+ "starting from the current number of jobs in the closed class, and increasing the number of jobs of" + " selected class only.\n\n";
	NCPA = ncpa;
	cd = classDef;
	sd = stationDef;
	simd = simDef;
	gui = guiInterface;
	initialize();
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:18,代码来源:NumberOfCustomersPanel.java

示例9: PopulationMixPanel

public PopulationMixPanel(PopulationMixParametricAnalysis pmpa, ClassDefinition classDef, StationDefinition stationDef,
		SimulationDefinition simDef) {
	super();
	PMPA = pmpa;
	super.setOrientation(JSplitPane.HORIZONTAL_SPLIT);
	super.setDividerSize(3);
	DESCRIPTION = "This type of analysis is available for closed models with two classes only "
			+ "(and possibly other open classes) and it applies only to the closed classes.\n\n"
			+ "Repeat the simulation changing the proportion of jobs "
			+ "between the two closed classes, keeping constant the total number of jobs.\n\n"
			+ "The 'From' and 'To' values represent the initial and final values of " + "population mix (�i = Ni / N) for the chosen class.\n\n"
			+ "Since only integer values are allowed " + "the number of steps that can be practically executed may be very small.";

	sd = stationDef;
	cd = classDef;
	simd = simDef;
	initialize();
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:18,代码来源:PopulationMixPanel.java

示例10: initAssetsComponent

private static Component initAssetsComponent() {
  JSplitPane split = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
  AssetTree tree = new AssetTree();
  split.setLeftComponent(tree);
  assetPanel = new AssetPanel();

  JScrollPane scrollPane = new JScrollPane(assetPanel);

  split.addPropertyChangeListener(JSplitPane.DIVIDER_LOCATION_PROPERTY, evt -> userPreferences.setAssetsSplitter(split.getDividerLocation()));
  split.setDividerLocation(userPreferences.getMainSplitterPosition() != 0 ? userPreferences.getAssetsSplitter() : 200);

  split.setRightComponent(scrollPane);
  return split;
}
 
开发者ID:gurkenlabs,项目名称:litiengine,代码行数:14,代码来源:Program.java

示例11: updateDisplayHandlerLayouts

/**
 * Updates the layout orientation of the test result window based on the
 * dimensions of the ResultWindow in its position.
 */
private void updateDisplayHandlerLayouts() {
    int x = ResultWindow.getInstance().getWidth();
    int y = ResultWindow.getInstance().getHeight();

    int orientation = x > y
            ? JSplitPane.HORIZONTAL_SPLIT
            : JSplitPane.VERTICAL_SPLIT;

    ResultWindow.getInstance().setOrientation(orientation);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Manager.java

示例12: createGroupPanel

private JComponent createGroupPanel() {
    JSplitPane pane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);

    groupTable = new JTable(groupModel) {
        /**
         *
         */
        private static final long serialVersionUID = 5000667220319722662L;


        public void changeSelection(int rowIndex, int columnIndex,
                                    boolean toggle, boolean extend) {
            super.changeSelection(rowIndex, columnIndex, toggle, extend);
            qualifierModel.fireTableDataChanged();
            deleteGroup.setEnabled(rowIndex >= 0);
        }
    };
    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setViewportView(groupTable);

    pane.setLeftComponent(scrollPane);

    JScrollPane pane2 = new JScrollPane();
    qualifiersTable = new JTable(qualifierModel);
    pane2.setViewportView(qualifiersTable);
    pane.setRightComponent(pane2);
    pane.setDividerLocation(400);
    return pane;
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:29,代码来源:EditUsersDialog.java

示例13: resizeSplit

protected void resizeSplit( int orientation, int splitSize, int nonResizingSize ) {
    if( orientation == JSplitPane.HORIZONTAL_SPLIT )
        split.setSize( splitSize, nonResizingSize );
    else
        split.setSize( nonResizingSize, splitSize );
    testWindow.getContentPane().add( split );
    split.validate();
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:8,代码来源:MultiSplitPaneTest.java

示例14: splitpane

/** Constructs a new SplitPane containing the two components given as arguments
 * @param orientation - the orientation (HORIZONTAL_SPLIT or VERTICAL_SPLIT)
 * @param first - the left component (if horizontal) or top component (if vertical)
 * @param second - the right component (if horizontal) or bottom component (if vertical)
 * @param initialDividerLocation - the initial divider location (in pixels)
 */
public static JSplitPane splitpane (int orientation, Component first, Component second, int initialDividerLocation) {
   JSplitPane x = make(new JSplitPane(orientation, first, second), new EmptyBorder(0,0,0,0));
   x.setContinuousLayout(true);
   x.setDividerLocation(initialDividerLocation);
   x.setOneTouchExpandable(false);
   x.setResizeWeight(0.5);
   if (Util.onMac() && (x.getUI() instanceof BasicSplitPaneUI)) {
      boolean h = (orientation != JSplitPane.HORIZONTAL_SPLIT);
      ((BasicSplitPaneUI)(x.getUI())).getDivider().setBorder(new OurBorder(h,h,h,h));  // Makes the border look nicer on Mac OS X
   }
   return x;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:18,代码来源:OurUtil.java

示例15: getSecondComponent

private Component getSecondComponent(JSplitPane splitPane) {
    if (splitPane.getOrientation() == JSplitPane.HORIZONTAL_SPLIT) {
        return splitPane.getRightComponent();
    } else {
        return splitPane.getBottomComponent();
    }
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:7,代码来源:JCompoundSplitPane.java


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