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