當前位置: 首頁>>代碼示例>>Java>>正文


Java JSplitPane.setDividerSize方法代碼示例

本文整理匯總了Java中javax.swing.JSplitPane.setDividerSize方法的典型用法代碼示例。如果您正苦於以下問題:Java JSplitPane.setDividerSize方法的具體用法?Java JSplitPane.setDividerSize怎麽用?Java JSplitPane.setDividerSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.swing.JSplitPane的用法示例。


在下文中一共展示了JSplitPane.setDividerSize方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
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,代碼行數:17,代碼來源:JoinSectionPanel.java

示例2: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
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(semaphoreStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Semaphore Strategies"));
	mainPanel.setResizeWeight(1.0);
	jsp.setMinimumSize(new Dimension(200, 100));
	mainPanel.setLeftComponent(jsp);
	semaphoreEditor.setMinimumSize(new Dimension(225, 100));
	mainPanel.setRightComponent(semaphoreEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:17,代碼來源:SemaphoreSectionPanel.java

示例3: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
protected 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(routingStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Routing Strategies"));
	mainPanel.setResizeWeight(1.0);
	jsp.setMinimumSize(new Dimension(200, 100));
	mainPanel.setLeftComponent(jsp);
	routingProbEditor.setMinimumSize(new Dimension(225, 100));
	mainPanel.setRightComponent(routingProbEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:17,代碼來源:RoutingSectionPanel.java

示例4: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
protected 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(routingStrategies, WARNING_CLASS);
	//routing strategy selector on the left, routing probabilities editor on the right
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Routing Strategies"));
	mainPanel.setResizeWeight(.80); // Gives more space to left component
	jsp.setMinimumSize(new Dimension(180, 100));
	mainPanel.setLeftComponent(jsp);
	routingProbEditor.setMinimumSize(new Dimension(160, 100));
	mainPanel.setRightComponent(routingProbEditor);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:HOMlab,項目名稱:QN-ACTR-Release,代碼行數:18,代碼來源:RoutingSectionPanel.java

示例5: getDisplayPanel

import javax.swing.JSplitPane; //導入方法依賴的package包/類
/** Lazily creates and returns the top-level display panel. */
private JSplitPane getDisplayPanel() {
    JSplitPane result = this.displayPanel;
    if (result == null) {
        this.displayPanel = result = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
        result.setTopComponent(getGraphPanel());
        result.setBottomComponent(getErrorPanel());
        result.setDividerSize(0);
        result.setContinuousLayout(true);
        result.setResizeWeight(0.9);
        result.resetToPreferredSizes();
        result.setBorder(null);
    }
    return result;
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:16,代碼來源:StateDisplay.java

示例6: tweakSplitPaneUI

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:ClassesControllerUI.java

示例7: tweakSplitPaneUI

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private static void tweakSplitPaneUI(JSplitPane splitPane) {
    splitPane.setOpaque(false);
    splitPane.setBorder(null);
    splitPane.setDividerSize(3);

    if (!(splitPane.getUI() instanceof BasicSplitPaneUI)) {
        return;
    }

    BasicSplitPaneDivider divider = ((BasicSplitPaneUI) splitPane.getUI()).getDivider();

    if (divider != null) {
        divider.setBorder(null);
    }
}
 
開發者ID:apache,項目名稱:incubator-netbeans,代碼行數:16,代碼來源:OQLControllerUI.java

示例8: initialize

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private void initialize() {
	this.setSize(615, 430);

	final JSplitPane jsp = new JSplitPane();

	jsp.setLeftComponent(createPnlParameter());
	jsp.setRightComponent(createPnlArea());
	jsp.setDividerSize(0);
	jsp.setDividerLocation(201);

	this.setContentPane(jsp);
	this.setVisible(true);
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
 
開發者ID:tekrei,項目名稱:CoverageGA,代碼行數:15,代碼來源:CoverageFrame.java

示例9: adjustResultsPanel

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private void adjustResultsPanel() {
    JSplitPane contentPane = (JSplitPane) this.frame.getContentPane();
    getResultsPanel().adjustVisibility();
    if (getResultsPanel().isVisible()) {
        contentPane.setBottomComponent(getResultsPanel());
        contentPane.setDividerSize(1);
        contentPane.resetToPreferredSizes();
    } else {
        contentPane.remove(getResultsPanel());
        contentPane.setDividerSize(0);
    }
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:13,代碼來源:Simulator.java

示例10: createUnderPane

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private JSplitPane createUnderPane(JTree tree) {
    JTextArea toStringArea = new JTextArea();
    toStringArea.setLineWrap(true);
    toStringArea.setEditable(false);
    tree.addTreeSelectionListener(new ToStringListener(toStringArea));
    JSplitPane result = new JSplitPane(JSplitPane.VERTICAL_SPLIT,
            new JScrollPane(tree),
            new JScrollPane(toStringArea));
    result.setOneTouchExpandable(true);
    result.setDividerSize(8);
    result.setDividerLocation(0.8);
    return result;
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:14,代碼來源:GUIBrowser.java

示例11: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private void initComponents() {
	setLayout(new BorderLayout());

	String modeName = stationData.getTransitionModeName(stationKey, 0);
	firingBorder = new TitledBorder(new EtchedBorder(), "Firing Outcome for " + modeName);
	firingTable = new FiringOutcomeTable();
	firingPane = new JScrollPane(firingTable);
	firingPane.setBorder(firingBorder);
	firingPane.setMinimumSize(new Dimension(300, 240));

	leftPanel = new WarningScrollTable(firingPane, WARNING_CLASS_OUTGOING_ROUTING);
	leftPanel.addCheckVector(stationOutKeys);
	leftPanel.addCheckVector(classKeys);

	addModeButton = new JButton("Add Mode");
	addModeButton.setMinimumSize(DIM_BUTTON_M);
	modeTable = new ModeTable();
	JPanel modePanel = new JPanel(new BorderLayout(5, 5));
	modePanel.setBorder(new TitledBorder(new EtchedBorder(), "Modes"));
	modePanel.setMinimumSize(new Dimension(200, 120));
	modePanel.add(addModeButton, BorderLayout.NORTH);
	modePanel.add(new JScrollPane(modeTable), BorderLayout.CENTER);

	noticeText = new JTextArea("");
	noticeText.setOpaque(false);
	noticeText.setEditable(false);
	noticeText.setLineWrap(true);
	noticeText.setWrapStyleWord(true);
	JScrollPane noticePane = new JScrollPane(noticeText);
	noticePane.setBorder(new TitledBorder(new EtchedBorder(), "Notice"));
	noticePane.setMinimumSize(new Dimension(200, 120));

	JSplitPane rightPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
	rightPanel.setBorder(new EmptyBorder(0, 0, 0, 0));
	rightPanel.setDividerSize(4);
	rightPanel.setResizeWeight(1.0);
	rightPanel.setLeftComponent(modePanel);
	rightPanel.setRightComponent(noticePane);

	JSplitPane mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	mainPanel.setDividerSize(4);
	mainPanel.setResizeWeight(1.0);
	mainPanel.setLeftComponent(leftPanel);
	mainPanel.setRightComponent(rightPanel);

	add(mainPanel);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:49,代碼來源:FiringSectionPanel.java

示例12: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private void initComponents() {
	setLayout(new BorderLayout());

	String modeName = stationData.getTransitionModeName(stationKey, 0);
	enablingBorder = new TitledBorder(new EtchedBorder(), "Enabling Condition for " + modeName);
	enablingTable = new ConditionTable(true);
	enablingPane = new JScrollPane(enablingTable);
	enablingPane.setBorder(enablingBorder);
	enablingPane.setMinimumSize(new Dimension(300, 120));

	inhibitingBorder = new TitledBorder(new EtchedBorder(), "Inhibiting Condition for " + modeName);
	inhibitingTable = new ConditionTable(false);
	inhibitingPane = new JScrollPane(inhibitingTable);
	inhibitingPane.setBorder(inhibitingBorder);
	inhibitingPane.setMinimumSize(new Dimension(300, 120));

	JPanel conditionPanel = new JPanel(new GridLayout(2, 1, 3, 3));
	conditionPanel.add(enablingPane);
	conditionPanel.add(inhibitingPane);

	leftPanel = new WarningScrollTable(conditionPanel, WARNING_CLASS_INCOMING_ROUTING);
	leftPanel.addCheckVector(stationInKeys);
	leftPanel.addCheckVector(classKeys);

	addModeButton = new JButton("Add Mode");
	addModeButton.setMinimumSize(DIM_BUTTON_M);
	modeTable = new ModeTable();
	JPanel modePanel = new JPanel(new BorderLayout(5, 5));
	modePanel.setBorder(new TitledBorder(new EtchedBorder(), "Modes"));
	modePanel.setMinimumSize(new Dimension(200, 120));
	modePanel.add(addModeButton, BorderLayout.NORTH);
	modePanel.add(new JScrollPane(modeTable), BorderLayout.CENTER);

	noticeText = new JTextArea("");
	noticeText.setOpaque(false);
	noticeText.setEditable(false);
	noticeText.setLineWrap(true);
	noticeText.setWrapStyleWord(true);
	JScrollPane noticePane = new JScrollPane(noticeText);
	noticePane.setBorder(new TitledBorder(new EtchedBorder(), "Notice"));
	noticePane.setMinimumSize(new Dimension(200, 120));

	JSplitPane rightPanel = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
	rightPanel.setBorder(new EmptyBorder(0, 0, 0, 0));
	rightPanel.setDividerSize(4);
	rightPanel.setResizeWeight(1.0);
	rightPanel.setLeftComponent(modePanel);
	rightPanel.setRightComponent(noticePane);

	JSplitPane mainPanel = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	mainPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
	mainPanel.setDividerSize(4);
	mainPanel.setResizeWeight(1.0);
	mainPanel.setLeftComponent(leftPanel);
	mainPanel.setRightComponent(rightPanel);

	add(mainPanel);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:59,代碼來源:EnablingSectionPanel.java

示例13: initComponents

import javax.swing.JSplitPane; //導入方法依賴的package包/類
protected void initComponents() {
	this.setLayout(new BorderLayout());

	gPaneAdvanced = new JRootPane();
	gPaneStandard = new JRootPane();
	forkStrategiesPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
	forkStrategiesPane.setDividerSize(4);
	forkStrategiesPane.setBorder(new EmptyBorder(0, 0, 0, 0));
	forkStrategiesPane.setResizeWeight(1.0);

	JSplitPane leftPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
	leftPane.setDividerSize(3);
	leftPane.setBorder(new EmptyBorder(0, 0, 0, 0));
	leftPane.setResizeWeight(0.65);

	WarningScrollTable jsp = new WarningScrollTable(forkStrategies, WARNING_CLASS);
	jsp.setBorder(new TitledBorder(new EtchedBorder(), "Advanced Fork Strategies"));
	jsp.setMinimumSize(new Dimension(200, 100));

	descrTextPane = new JTextArea("");
	descrTextPane.setOpaque(false);
	descrTextPane.setEditable(false);
	descrTextPane.setLineWrap(true);
	descrTextPane.setWrapStyleWord(true);
	descrPane.setBorder(new TitledBorder(new EtchedBorder(), "Description"));
	descrPane.setViewportView(descrTextPane);

	leftPane.setLeftComponent(jsp);
	leftPane.setRightComponent(descrPane);
	forkStrategiesPane.setLeftComponent(leftPane);
	forkProbEditor.setMinimumSize(new Dimension(225, 100));
	forkStrategiesPane.setRightComponent(forkProbEditor);

	gPaneAdvanced.getContentPane().add(forkStrategiesPane);
	gPaneAdvanced.setGlassPane(new GlassPane());
	gPaneAdvanced.getGlassPane().setVisible(sd.getIsSimplifiedFork(stationKey));

	//layout of fragNum panel
	JPanel fragnum = new JPanel();
	fragnum.setLayout(new BorderLayout());
	fragnum.setBorder(new TitledBorder(new EtchedBorder(), "Standard Fork Strategy"));
	useSim.setText("Enable Advanced Fork Strategies");
	JLabel text = new JLabel("Number of tasks to be generated on each output link for each input job (customer) to the Fork:");
	text.setLabelFor(numForkSpinner);
	JPanel forkDegreePane = new JPanel();
	forkDegreePane.add(text);
	forkDegreePane.add(numForkSpinner);
	fragnum.add(forkDegreePane, BorderLayout.NORTH);

	gPaneStandard.getContentPane().add(fragnum);
	gPaneStandard.setGlassPane(new GlassPane());
	gPaneStandard.getGlassPane().setVisible(!sd.getIsSimplifiedFork(stationKey));

	useSim.setSelected(!sd.getIsSimplifiedFork(stationKey));
	numForkSpinner.setEnabled(sd.getIsSimplifiedFork(stationKey));

	useSim.addActionListener(new ActionListener() {
		@Override
		public void actionPerformed(ActionEvent arg0) {
			boolean isSim = !useSim.isSelected();
			sd.setIsSimplifiedFork(stationKey, isSim);
			numForkSpinner.setEnabled(isSim);
			gPaneAdvanced.getGlassPane().setVisible(isSim);
			gPaneStandard.getGlassPane().setVisible(!isSim);
		}
	});

	JPanel mainPanel = new JPanel();
	mainPanel.setLayout(new BorderLayout());
	mainPanel.add(gPaneStandard, BorderLayout.NORTH);
	mainPanel.add(gPaneAdvanced, BorderLayout.CENTER);
	add(useSim, BorderLayout.NORTH);
	add(mainPanel, BorderLayout.CENTER);
}
 
開發者ID:max6cn,項目名稱:jmt,代碼行數:75,代碼來源:InGateWaySectionPanel.java

示例14: init

import javax.swing.JSplitPane; //導入方法依賴的package包/類
public void init(){
		JFrame.setDefaultLookAndFeelDecorated(true);
		f = new JFrame();
		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		f.setPreferredSize(new Dimension(FRAME_WIDTH, FRAME_HEIGHT));
		f.setTitle("群控");       
		f.setResizable(true);   
		f.setLocationRelativeTo(null);
		
		jpControl = new JPanel();
		jbSendZone = new JButton("發送朋友圈");
		jpControl.add(jbSendZone);
		
		jpDevice = new JPanel();
//		jpDevice.setLayout(new FlowLayout(FlowLayout.LEADING, 20, 5));
		jpDevice.setLayout(new WrapLayout(WrapLayout.LEFT));
		Iterator<Entry<String, Thread>> iter = Devices.devices.entrySet().iterator();
		int port = 1313, count=0;
		while(iter.hasNext()){
			Map.Entry<String, Thread> entry = (Map.Entry<String, Thread>)iter.next();
			String serial = entry.getKey();
			JPanel jp = new JPanel();
			DrawImageThread dit = new DrawImageThread(serial, port++, jp);
			dit.start();			//啟動繪製線程
			entry.setValue(dit);	//在device list中保存線程句柄
			
			count++;
			jpDevice.add(jp);
		}
		jspDevice = new JScrollPane(jpDevice);
		jspDevice.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
	
		jsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, jpControl, jspDevice);
		jsp.setDividerLocation(0.3);
		jsp.setDividerSize(10);
		jsp.setOneTouchExpandable(true);
		f.add(jsp);
		
		f.pack();
		f.setVisible(true);
	}
 
開發者ID:larryzhuo,項目名稱:JavaMinicap,代碼行數:42,代碼來源:MainFrame.java


注:本文中的javax.swing.JSplitPane.setDividerSize方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。