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


Java JSplitPane.setOneTouchExpandable方法代碼示例

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


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

示例1: buildDisplay

import javax.swing.JSplitPane; //導入方法依賴的package包/類
@Override
protected void buildDisplay() {
    JPanel queryPane = new JPanel(new BorderLayout());
    JLabel leading = new JLabel(" ?- ");
    leading.setFont(leading.getFont().deriveFont(Font.BOLD));
    queryPane.add(leading, BorderLayout.WEST);
    queryPane.add(getQueryField(), BorderLayout.CENTER);
    JPanel buttonsPane = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));
    buttonsPane.add(createExecuteButton());
    buttonsPane.add(getNextResultButton());
    buttonsPane.setBorder(null);
    queryPane.add(buttonsPane, BorderLayout.EAST);

    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(.4);
    splitPane.setBottomComponent(getTabPane());
    splitPane.setTopComponent(getResultsPanel());

    JPanel mainPane = new JPanel(new BorderLayout());
    mainPane.add(queryPane, BorderLayout.NORTH);
    mainPane.add(splitPane, BorderLayout.CENTER);

    setLayout(new BorderLayout());
    add(mainPane, BorderLayout.CENTER);
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:27,代碼來源:PrologDisplay.java

示例2: init

import javax.swing.JSplitPane; //導入方法依賴的package包/類
/**
 * Initialize this visualizer
 * @throws ClassNotFoundException 
 * @throws IllegalAccessException 
 * @throws InstantiationException 
 */
private void init() {  // WARNING: called from ctor so must not be overridden (i.e. must be private or final)
    log.debug("init() - pass");
    setLayout(new BorderLayout(0, 5));
    setBorder(makeBorder());
    add(makeTitlePanel(), BorderLayout.NORTH);

    leftSide = createLeftPanel();
    // Prepare the common tab
    rightSide = new JTabbedPane();

    // Create the split pane
    mainSplit = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftSide, rightSide);
    mainSplit.setOneTouchExpandable(true);

    JSplitPane searchAndMainSP = new JSplitPane(JSplitPane.VERTICAL_SPLIT, 
            new SearchTreePanel(root), mainSplit);
    searchAndMainSP.setOneTouchExpandable(true);
    add(searchAndMainSP, BorderLayout.CENTER);
    // init right side with first render
    resultsRender.setRightSide(rightSide);
    resultsRender.init();
}
 
開發者ID:Blazemeter,項目名稱:jmeter-bzm-plugins,代碼行數:29,代碼來源:ViewResultsFullVisualizer.java

示例3: splitpane

import javax.swing.JSplitPane; //導入方法依賴的package包/類
/**
 * 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:AlloyTools,項目名稱:org.alloytools.alloy,代碼行數:32,代碼來源:OurUtil.java

示例4: buildDisplay

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

    JSplitPane splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, getTabPane(),
        new JScrollPane(getEditorPane()));

    getEditorPane().setEditable(false);

    splitPane.setOneTouchExpandable(true);
    splitPane.setDividerLocation(0.8);
    splitPane.setResizeWeight(0.8);

    add(splitPane, BorderLayout.CENTER);
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:17,代碼來源:GroovyDisplay.java

示例5: getDisplaysInfoPanel

import javax.swing.JSplitPane; //導入方法依賴的package包/類
/**
 * Lazily creates and returns the split pane
 * containing the displays and info panels.
 */
JSplitPane getDisplaysInfoPanel() {
    JSplitPane result = this.displaysInfoPanel;
    if (result == null) {
        this.displaysInfoPanel = result = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT);
        result.setLeftComponent(getDisplaysPanel());
        result.setRightComponent(getDisplaysPanel().getInfoPanel());
        result.setOneTouchExpandable(true);
        result.setResizeWeight(1);
        result.setDividerLocation(0.8);
        result.setContinuousLayout(true);
        result.setBorder(null);
        ToolTipManager.sharedInstance()
            .registerComponent(result);
    }
    return result;
}
 
開發者ID:meteoorkip,項目名稱:JavaGraph,代碼行數:21,代碼來源:Simulator.java

示例6: SwingSpyPanel

import javax.swing.JSplitPane; //導入方法依賴的package包/類
/**
	 * Initialization.
	 */
	public SwingSpyPanel() {
		setPreferredSize(new Dimension(INITIAL_WIDTH, INITIAL_HEIGHT));
		setLayout(new BorderLayout());

		root = new DefaultMutableTreeNode();
		componentTree = new JTree(root);
		componentTree.setRootVisible(false);
		componentTree.setCellRenderer(new SwingComponentRenderer());
		componentTree.addTreeSelectionListener(new CustomSelectionListener());
//		add(new JScrollPane(componentTree), BorderLayout.CENTER);

		detailsData = new JEditorPane();
		detailsData.setBackground(new Color(250, 250, 250));
		detailsData.setForeground(new Color(33, 33, 33));
		detailsData.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 244), 1));
		detailsData.setPreferredSize(new Dimension(150, INITIAL_HEIGHT));
		detailsData.setEditable(false);
		detailsData.setContentType("text/html");
		SwingUtil.enforceJEditorPaneFont(detailsData, font);
		detailsScrollPane = new JScrollPane(detailsData);
//		add(detailsScrollPane, BorderLayout.EAST);

		JSplitPane hPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, new JScrollPane(componentTree), detailsScrollPane);
		hPane.setContinuousLayout(true);
		hPane.setOneTouchExpandable(true);
		hPane.setDividerLocation(INITIAL_WIDTH - 200);
		add(hPane, BorderLayout.CENTER);

		componentData = new JEditorPane();
		componentData.setBackground(new Color(250, 250, 250));
		componentData.setForeground(new Color(33, 33, 33));
		componentData.setBorder(BorderFactory.createLineBorder(new Color(100, 100, 244), 1));
		componentData.setPreferredSize(new Dimension(INITIAL_WIDTH, 36));
		componentData.setEditable(false);
		componentData.setContentType("text/html");
		SwingUtil.enforceJEditorPaneFont(componentData, font);
		add(componentData, BorderLayout.SOUTH);

	}
 
開發者ID:igr,項目名稱:swingspy,代碼行數:43,代碼來源:SwingSpyPanel.java

示例7: XMCS

import javax.swing.JSplitPane; //導入方法依賴的package包/類
public XMCS( XMap map ) {
	this.map = map;
	image = createXMImage(dig1);
	imageAlt = createXMImage(dig2);
	image.setOtherImage( imageAlt );
	imageAlt.setOtherImage( image );

	// GMA 1.6.2: Changed the default split of the view area to make the view windows more visible
	imagePane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
			image.panel, imageAlt.panel );

	imagePane.setOneTouchExpandable( true );
	imagePane.setDividerLocation(imagePane.getMaximumDividerLocation() + 150);
}
 
開發者ID:iedadata,項目名稱:geomapapp,代碼行數:15,代碼來源:XMCS.java

示例8: Radar

import javax.swing.JSplitPane; //導入方法依賴的package包/類
public Radar( XMap map ) {
	this.map = map;
	image = new RImage();
	imageAlt = new RImage();
	image.setOtherImage( imageAlt );
	imageAlt.setOtherImage( image );
	imagePane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
			image.panel, imageAlt.panel );
	
	imagePane.setDividerLocation(400);		
	imagePane.setOneTouchExpandable( true );
}
 
開發者ID:iedadata,項目名稱:geomapapp,代碼行數:13,代碼來源:Radar.java

示例9: splitpane

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

示例10: erzeugeAuflisterPanel

import javax.swing.JSplitPane; //導入方法依賴的package包/類
/**
 * Erzeugt das Panel für die Anzeige der Kunden- und Medien-Tabelle, die
 * durch eine Splittpane voneinander getrennt sind.
 * 
 */
private void erzeugeAuflisterPanel()
{
    JPanel auflisterPanel = new JPanel();
    _hauptPanel.add(auflisterPanel, BorderLayout.CENTER);
    auflisterPanel.setLayout(new BorderLayout());
    setNoSize(auflisterPanel);
    auflisterPanel.setBackground(UIConstants.BACKGROUND_COLOR);

    _auflisterSplitpane = new JSplitPane();
    auflisterPanel.add(_auflisterSplitpane, BorderLayout.CENTER);
    _auflisterSplitpane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    _auflisterSplitpane.setOneTouchExpandable(true);
    _auflisterSplitpane.setDividerLocation(300);

    setNoSize(_auflisterSplitpane);
    _auflisterSplitpane.setContinuousLayout(true);
    _auflisterSplitpane.setDoubleBuffered(true);
    _auflisterSplitpane.setResizeWeight(0.5);
    _auflisterSplitpane.setBackground(UIConstants.BACKGROUND_COLOR);
    _auflisterSplitpane
        .setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
    // Kundendarstellung
    _auflisterSplitpane.add(_kundenauflisterPanel, JSplitPane.TOP);
    // Mediendarstellung
    _auflisterSplitpane.add(_medienauflisterPanel, JSplitPane.BOTTOM);
}
 
開發者ID:polemonium,項目名稱:SE2Project,代碼行數:32,代碼來源:AusleiheUI.java

示例11: MCS

import javax.swing.JSplitPane; //導入方法依賴的package包/類
public MCS( XMap map ) {
	this.map = map;
	image = new MCSImage2();
	imageAlt = new MCSImage2();
	imagePane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
			image.panel, imageAlt.panel );
	imagePane.setDividerLocation(1.);
	imagePane.setOneTouchExpandable( true );
}
 
開發者ID:iedadata,項目名稱:geomapapp,代碼行數:10,代碼來源:MCS.java

示例12: init

import javax.swing.JSplitPane; //導入方法依賴的package包/類
private void init() {
    setLayout(new BorderLayout());
    splitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT);
    splitPane.setOneTouchExpandable(true);
    splitPane.setBottomComponent(objectTable);
    TreeSearch tSearch = TreeSearch.installForOR(objectTree.getTree());
    splitPane.setTopComponent(tSearch);
    splitPane.setResizeWeight(.5);
    splitPane.setDividerLocation(.5);
    add(splitPane);
}
 
開發者ID:CognizantQAHub,項目名稱:Cognizant-Intelligent-Test-Scripter,代碼行數:12,代碼來源:WebORPanel.java

示例13: prepareControls

import javax.swing.JSplitPane; //導入方法依賴的package包/類
protected void prepareControls() {
    JFrame frame = new JFrame("SplitPane Mixing");
    JPanel p = new JPanel(new GridLayout());
    p.setPreferredSize(new Dimension(500, 500));
    propagateAWTControls(p);
    sp1 = new JScrollPane(p);

    JButton button = new JButton("JButton");
    button.setBackground(Color.RED);
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent e) {
            clicked = true;
        }
    });
    sp2 = new JScrollPane(button);

    JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sp1, sp2);
    splitPane.setOneTouchExpandable(false);
    splitPane.setDividerLocation(150);

    splitPane.setPreferredSize(new Dimension(400, 200));

    frame.getContentPane().add(splitPane);
    frame.pack();
    frame.setVisible(true);
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:28,代碼來源:JSplitPaneOverlapping.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

示例15: MainWindow

import javax.swing.JSplitPane; //導入方法依賴的package包/類
public MainWindow() {
	workspace = new Workspace();
	barMenu = new MenuBar(workspace);
	queryList = new QueryList();
	console = new Console();
	databaseViewerPanel = new DatabaseViewer();

	setLocale(new Locale(DEFAULT_LANG));
	setResourceBundle(ResourceBundle.getBundle(BUNDLES_LOCATION, getLocale()));

	mainContainer = new JPanel(new BorderLayout());
	JPanel rightPanel = new JPanel(new BorderLayout());
	JPanel rightInnerPanel = new JPanel(new BorderLayout());
	
	rightInnerPanel.add(queryList, BorderLayout.WEST);
	rightInnerPanel.add(workspace, BorderLayout.CENTER);
	
	// HORIZONTAL SPLITPANE
	horSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, true,
			rightInnerPanel, console);
	horSplitPane.setOneTouchExpandable(true);
	setUpHorSplitPaneHeight();
	
	// VERTICAL SPLITPANE
	//JSplitPane verSplitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, 
		//	databaseViewerPanel, rightPanel);
	//verSplitPane.setResizeWeight(VERTICAL_SPLITPANE_DEFAULT_WEIGHT);
	//verSplitPane.setOneTouchExpandable(true);
	
	rightPanel.add(horSplitPane, BorderLayout.CENTER);
	mainContainer.setBorder(new EmptyBorder(BORDER_GAP, BORDER_GAP, BORDER_GAP, BORDER_GAP));
	
	setLayout(new BorderLayout());
	mainContainer.add(databaseViewerPanel, BorderLayout.WEST);
	mainContainer.add(horSplitPane);
	add(mainContainer, BorderLayout.CENTER);
	
	mainContainer.setVisible(false);
	setJMenuBar(barMenu);
	setListeners();
	buildWindow();
	
	// Make relational algebra code editor focused
	addWindowFocusListener(new WindowAdapter() {
	    public void windowGainedFocus(WindowEvent e) {
	        getWorkspace().getRelationalAlgebraCodeEditor().requestFocusInWindow();
	    }
	});
	
	/**
	 * Redirect System.out to the console in the GUI.
	 */
	redirectOutputToConsole();

	translate();
}
 
開發者ID:tteguayco,項目名稱:JITRAX,代碼行數:57,代碼來源:MainWindow.java


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