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