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


Java JSplitPane.setRightComponent方法代码示例

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


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

示例1: initGui

import javax.swing.JSplitPane; //导入方法依赖的package包/类
protected TreeView initGui () {
    TTW retVal = new TTW () ;
    
    
    split = new JSplitPane (JSplitPane.HORIZONTAL_SPLIT);
    PropertySheetView propertyView = new PropertySheetView();
    
    split.setLeftComponent(retVal);
    split.setRightComponent(propertyView);
    // install proper border for split pane
    split.setBorder((Border)UIManager.get("Nb.ScrollPane.border")); // NOI18N

    setLayout (new java.awt.GridBagLayout ());

    GridBagConstraints gridBagConstraints = new GridBagConstraints ();
    gridBagConstraints.fill = GridBagConstraints.BOTH;
    gridBagConstraints.weightx = 1.0;
    gridBagConstraints.weighty = 1.0;
    gridBagConstraints.gridwidth = 2;
    add (split, gridBagConstraints);

    return retVal;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:OptionsAction.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: setup_child_split_pane_right

import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void setup_child_split_pane_right(final JSplitPane split_pane){
	JScrollPane result_scroll_pane = new JScrollPane();
	split_pane.setRightComponent(result_scroll_pane);
	
	JPanel result_panel = new JPanel();
	result_panel.setLayout(new BoxLayout(result_panel, BoxLayout.Y_AXIS));
	result_scroll_pane.setViewportView(result_panel);
	
	result_text_pane = new JTextPane();
	result_text_pane.setEditable(false);
	result_text_pane.setContentType("text/html");
	result_panel.add(result_text_pane);
	
	JPanel checkbox_panel = new JPanel();
	result_panel.add(checkbox_panel);
	
	show_all_checkbox = new JCheckBox("Show all");
	checkbox_panel.add(show_all_checkbox);
}
 
开发者ID:QwertygidQ,项目名称:DeutschSim,代码行数:20,代码来源:GUI.java

示例4: 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

示例5: initAssetsComponent

import javax.swing.JSplitPane; //导入方法依赖的package包/类
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,代码行数:15,代码来源:Program.java

示例6: addComponentsToContainer

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/** Adds real components to given container (according to layout
   * constraints stored for the components).
   * @param container instance of a real container to be added to
   * @param containerDelegate effective container delegate of the container
   * @param components components to be added
   * @param index position at which to add the components to container
   */
  @Override
  public void addComponentsToContainer(Container container,
                                       Container containerDelegate,
                                       Component[] components,
                                       int index)
  {
      if (!(container instanceof JSplitPane))
          return;	
	
      for (int i=0; i < components.length; i++) {	    	    
   JSplitPane splitPane = (JSplitPane) container;
   
          int descPos = convertPosition(getConstraints(i + index));
          if (descPos == 0) {
if(splitPane.getClientProperty(LEFT_TOP_BUTTON)==null) {	    
    // store the defaul swing button, so we can fall back to it 
    // if component[i] will be removed later...
    splitPane.putClientProperty(LEFT_TOP_BUTTON, splitPane.getLeftComponent());  
} 
splitPane.setLeftComponent(components[i]);
   } 
   else if (descPos == 1) {
if(splitPane.getClientProperty(RIGHT_BOTTOM_BUTTON)==null) {
    // store the defaul swing button, so we can fall back to it 
    // if component[i] will be removed later...
    splitPane.putClientProperty(RIGHT_BOTTOM_BUTTON, splitPane.getRightComponent());	    	    	    
} 							    				
splitPane.setRightComponent(components[i]);	    
   }
              
      }	
  }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:40,代码来源:JSplitPaneSupport.java

示例7: removeComponentFromContainer

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/** Removes a real component from a real container.
    * @param container instance of a real container
    * @param containerDelegate effective container delegate of the container
    * @param component component to be removed
    * @return whether it was possible to remove the component (some containers
    *         may not support removing individual components reasonably)
    */
   @Override
   public boolean removeComponentFromContainer(Container container,
                                               Container containerDelegate,
                                               Component component)
   {
if( !(containerDelegate instanceof JSplitPane) ) {
    return false; // should not happen
}	

JSplitPane splitPane = (JSplitPane) containerDelegate;

if( component == splitPane.getLeftComponent() ) { 
    if( super.removeComponentFromContainer(container, containerDelegate, component) ) {
	JButton left = (JButton) splitPane.getClientProperty(LEFT_TOP_BUTTON);
	if( left != null ) {
	    // fall back to the default swing setting
	    splitPane.setLeftComponent(left);
	    splitPane.putClientProperty(LEFT_TOP_BUTTON, null);
	}	
	return true;
    }
} else if ( component == splitPane.getRightComponent() ) {    
    if( super.removeComponentFromContainer(container, containerDelegate, component) ) {
	JButton right = (JButton) splitPane.getClientProperty(RIGHT_BOTTOM_BUTTON);
	if( right != null ) {
	    // fall back to the default swing setting		    
	    splitPane.setRightComponent(right);		    
	    splitPane.putClientProperty(RIGHT_BOTTOM_BUTTON, null);
	}	
	return true;
    }
}

       return super.removeComponentFromContainer(container, containerDelegate, component);
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:43,代码来源:JSplitPaneSupport.java

示例8: createSplitPane

import javax.swing.JSplitPane; //导入方法依赖的package包/类
private JSplitPane createSplitPane(Component lower) {
    JSplitPane pane = new JSplitPane();

    if (firstSplit == null) {
        firstSplit = Boolean.TRUE;
    } else {
        firstSplit = Boolean.FALSE;
    }

    pane.setRightComponent(lower);
    pane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    pane.setContinuousLayout(true);
    pane.setResizeWeight(1);
    pane.setDividerLocation(0.80f);
    pane.setBorder(BorderFactory.createEmptyBorder());
    //Do not install our custom split pane UI on Nimbus L&F
    if (!"Nimbus".equals(UIManager.getLookAndFeel().getID())) {
        pane.setUI(PropUtils.createSplitPaneUI());
    }

    // #52188: default F6 behaviour doesn't make to much sense in NB 
    // property sheet and blocks NetBeans default F6
    pane.getActionMap().getParent().remove("toggleFocus");
    if( PropUtils.isAqua ) {
        pane.setBackground( UIManager.getColor("NbExplorerView.background") ); //NOI18N
    }

    return pane;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:30,代码来源:PSheet.java

示例9: initialize

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
 * This method initializes this
 *
 * @return void
 */
private void initialize() {
    setLayout(new BorderLayout());
    this.setSize(new Dimension(441, 231));
    JSplitPane splitPane = new JSplitPane();
    this.add(splitPane, java.awt.BorderLayout.CENTER);
    splitPane.setOrientation(JSplitPane.VERTICAL_SPLIT);
    splitPane.setDividerLocation(0.75d);
    splitPane.setLeftComponent(getSelectRowPane());
    splitPane.setRightComponent(getJPanel4());
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:16,代码来源:SectorRowsEditor.java

示例10: createGroupPanel

import javax.swing.JSplitPane; //导入方法依赖的package包/类
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,代码行数:30,代码来源:EditUsersDialog.java

示例11: setupPane

import javax.swing.JSplitPane; //导入方法依赖的package包/类
/**
 * Adds content to the primary splitpane.
 */
private void setupPane() {
	// Setup splitpane, will host main content such as the file tree and the
	// tabbed panel which will hold classes and other menus.
	JSplitPane splitPane = new JSplitPane();
	splitPane.setResizeWeight(0.1);
	splitPane.setOneTouchExpandable(true);
	frame.getContentPane().add(splitPane, BorderLayout.CENTER);
	splitPane.setLeftComponent(classTree);
	splitPane.setRightComponent(tabs);
}
 
开发者ID:Col-E,项目名称:Recaf,代码行数:14,代码来源:SwingUI.java

示例12: 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

示例13: setup_main_split_pane_bottom

import javax.swing.JSplitPane; //导入方法依赖的package包/类
private void setup_main_split_pane_bottom(final JSplitPane split_pane) {
	JScrollPane list_scroll_pane = new JScrollPane();
	split_pane.setRightComponent(list_scroll_pane);
	
	gate_list = new GateList(gate_table_cell_size);
	list_scroll_pane.setViewportView(gate_list);
}
 
开发者ID:QwertygidQ,项目名称:DeutschSim,代码行数:8,代码来源:GUI.java

示例14: RSFViewer

import javax.swing.JSplitPane; //导入方法依赖的package包/类
public RSFViewer(final Engine engine) {
    this.engine = engine;
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            try {
                ((FileIEngineImpl) engine.getDeligate()).close();
            } catch (IOException e1) {
                e1.printStackTrace();
            }
            System.exit(0);
        }
    });
    this.setTitle("Ramus files viewer sample 1");

    JSplitPane pane = new JSplitPane();

    pane.setLeftComponent(createQualifiersList());
    pane.setRightComponent(createTreeView());

    this.setContentPane(pane);

    this.pack();
    this.setSize(800, 600);
    this.setLocationRelativeTo(null);
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:28,代码来源:RSFViewer.java

示例15: RSFViewer2

import javax.swing.JSplitPane; //导入方法依赖的package包/类
public RSFViewer2(final Engine engine) {
    this.engine = engine;
    this.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    this.addWindowListener(new WindowAdapter() {
        @Override
        public void windowClosing(WindowEvent e) {
            try {
                ((FileIEngineImpl) engine.getDeligate()).close();
            } catch (IOException e1) {
                e1.printStackTrace();
            }
            System.exit(0);
        }
    });
    this.setTitle("Ramus files viewer sample 2");

    JSplitPane pane = new JSplitPane();

    pane.setLeftComponent(createQualifiersList());
    pane.setRightComponent(createTreeView());

    this.setContentPane(pane);

    this.pack();
    this.setSize(800, 600);
    this.setLocationRelativeTo(null);
}
 
开发者ID:Vitaliy-Yakovchuk,项目名称:ramus,代码行数:28,代码来源:RSFViewer2.java


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