当前位置: 首页>>代码示例>>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;未经允许,请勿转载。