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


Java JTabbedPane.setBorder方法代码示例

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


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

示例1: initComponents

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initComponents() {
	this.setLayout(new BorderLayout(5, 5));
	mainPanel = new JTabbedPane();
	mainPanel.setBorder(title);

	// Adds a change listener to perform gotFocus() and lostFocus() calls on wizardPanels
	mainPanel.addChangeListener(new ChangeListener() {
		/**
		 * Invoked when the target of the listener has changed its state.
		 *
		 * @param e a ChangeEvent object
		 */
		public void stateChanged(ChangeEvent e) {
			// Lose focus on old panel
			if (current != null) {
				current.lostFocus();
			}
			// gets focus on new panel
			if (mainPanel.getSelectedComponent() != null) {
				current = (WizardPanel) mainPanel.getSelectedComponent();
				current.gotFocus();
			}
		}
	});
	add(mainPanel, BorderLayout.CENTER);
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:27,代码来源:StationParameterPanel.java

示例2: initComponents

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
private void initComponents() {
	this.setLayout(new BorderLayout(5, 5));
	mainPanel = new JTabbedPane();
	mainPanel.setBorder(title);

	// Adds a change listener to perform gotFocus() and lostFocus() calls on wizardPanels
	mainPanel.addChangeListener(new ChangeListener() {

		/**
		 * Invoked when the target of the listener has changed its state.
		 *
		 * @param e a ChangeEvent object
		 */
		public void stateChanged(ChangeEvent e) {
			// Lose focus on old panel
			if (current != null) {
				current.lostFocus();
			}
			// gets focus on new panel
			if (mainPanel.getSelectedComponent() != null) {
				current = (WizardPanel) mainPanel.getSelectedComponent();
				current.gotFocus();
			}
		}
	});
	add(mainPanel, BorderLayout.CENTER);
}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:28,代码来源:StationParameterPanel.java

示例3: SyncSinkFrame

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
public SyncSinkFrame(){
	super("SyncSink");
	
	logTextField = new JTextArea();
	logTextField.setEditable(false);
	DefaultCaret caret = (DefaultCaret)logTextField.getCaret();
	caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
	
	StringBuilder sb = new StringBuilder();
	sb.append("----------------------------------------\n");
	sb.append("Configuration currently in use: \n");
	for(Key key : Key.values()){
		sb.append("\t");
		sb.append(key.name());
		sb.append("=");
		sb.append(Config.get(key));
		sb.append("\n");
	}
	sb.append("----------------------------------------\n");
	logTextField.setText(sb.toString());
	
	
	this.setLayout(new BorderLayout());
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	
	cs = new CoordinateSystem(AxisUnit.OCCURENCES, 0, 1000);
	
	linkedPanel = new LinkedPanel(cs);
	linkedPanel.addLayer(new BackgroundLayer(cs));
	linkedPanel.addLayer(new ZoomMouseListenerLayer());
	linkedPanel.addLayer(new DragMouseListenerLayer(cs));
	linkedPanel.addLayer(new BackgroundLayer(cs));
	linkedPanel.addLayer(new TimeAxisLayer(cs));
	linkedPanel.addLayer(new SelectionLayer(cs));
	linkedPanel.getViewPort().addViewPortChangedListener(this);
	
	matches = new ArrayList<NFFTSyncMatch>();
	
	this.streamLayers = new ArrayList<StreamLayer>();
	this.streamFiles = new ArrayList<File>();
	
	JTabbedPane tabbedPane = new JTabbedPane();

	
	tabbedPane.addTab("Timebox plot", null, linkedPanel,"Timebox plots");
	tabbedPane.setMnemonicAt(0, KeyEvent.VK_1);

	
	tabbedPane.addTab("Messages", null, new JScrollPane(logTextField),"Logs messages");
	tabbedPane.setMnemonicAt(1, KeyEvent.VK_2);
	
	tabbedPane.setTabPlacement(JTabbedPane.BOTTOM);
	tabbedPane.setBorder(new EmptyBorder(0,0,0,0));
	
	this.add(tabbedPane,BorderLayout.CENTER);
	this.add(createStatusBarPanel(),BorderLayout.SOUTH);
	
	new FileDrop(null, tabbedPane, /*dragBorder,*/ new FileDrop.Listener(){   
		public void filesDropped( final File[] files ){  
			new Thread(new Runnable(){
				@Override
				public void run() {
					for( int i = 0; i < files.length; i++) {   
						final File fileToAdd = files[i];
						logMessage("Adding " + fileToAdd.getPath()  + "...");							
			            openFile(fileToAdd,streamFiles.size());
			            logMessage("Added " + fileToAdd.getPath()  + ".");	
	                }
			}},"File adding thread").start();
		}
       });
}
 
开发者ID:JorenSix,项目名称:Panako,代码行数:73,代码来源:SyncSinkFrame.java

示例4: PrintJDialog

import javax.swing.JTabbedPane; //导入方法依赖的package包/类
public PrintJDialog(ControlJFrame objPcontrolJFrame, PrintService[] objPprintServiceA, int intPdefaultServiceIndex) {

		// Parse parameters :
		super(objPcontrolJFrame, Strings.doConcat(Tools.getLocaleString("dialog.printtitle"), ' ', Strings.strS_ELLIPSIS), true);
		this.objGcontrolJFrame = objPcontrolJFrame;
		this.objGprintServiceA = objPprintServiceA;
		this.intGdefaultServiceIndex = intPdefaultServiceIndex;
		this.objGprintService = objPprintServiceA[intPdefaultServiceIndex];
		this.bolGvalidated = true;
		this.objGhashPrintRequestAttributeSet = new HashPrintRequestAttributeSet();

		// Set icon :
		final Image imgL = this.objGcontrolJFrame.getJuggleMasterPro().getImage(Constants.intS_FILE_ICON_PRINT, 0);
		this.setIconImage(imgL != null ? imgL : this.objGcontrolJFrame.getJuggleMasterPro().getFrame().imgGjmp);

		// Build tabbed panel :
		this.setLayout(new BorderLayout());
		final JTabbedPane objLjTabbedPane = new JTabbedPane();
		objLjTabbedPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		this.objGprintGeneralJPanel = new PrintGeneralJPanel(this);
		objLjTabbedPane.add(Strings.doConcat(Strings.strS_SPACE, Tools.getLocaleString("tab.general"), Strings.strS_SPACE),
							this.objGprintGeneralJPanel);
		this.objGprintPageSetupJPanel = new PrintPageSetupJPanel(this, objPcontrolJFrame);
		objLjTabbedPane.add(Strings.doConcat(Strings.strS_SPACE, Tools.getLocaleString("tab.pagesetup"), Strings.strS_SPACE),
							this.objGprintPageSetupJPanel);
		this.objGprintAppearanceJPanel = new PrintAppearanceJPanel(this, objPcontrolJFrame);
		objLjTabbedPane.add(Strings.doConcat(Strings.strS_SPACE, Tools.getLocaleString("tab.appearance"), Strings.strS_SPACE),
							this.objGprintAppearanceJPanel);
		this.add(objLjTabbedPane, BorderLayout.CENTER);
		this.updatePanels();

		// Add OK and cancel buttons :
		final JPanel objLbuttonsJPanel = new JPanel(new FlowLayout(FlowLayout.TRAILING));
		objLbuttonsJPanel.setOpaque(true);
		this.objGoKJButton = new ExtendedJButton(this.objGcontrolJFrame, Tools.getLocaleString("button.print"));
		this.objGoKJButton.addActionListener(this);

		objLbuttonsJPanel.add(this.objGoKJButton);
		this.getRootPane().setDefaultButton(this.objGoKJButton);
		final ExtendedJButton objLcancelJButton = new ExtendedJButton(this.objGcontrolJFrame, Tools.getLocaleString("button.cancel"));
		objLcancelJButton.addActionListener(this);
		objLbuttonsJPanel.add(objLcancelJButton);
		this.add(objLbuttonsJPanel, BorderLayout.SOUTH);

		this.addWindowListener(new JDialogWindowListener(this.objGcontrolJFrame, this, false));
		this.setResizable(false);
		this.validate();
		this.pack();
		this.objGcontrolJFrame.setWindowBounds(this, this.objGcontrolJFrame, true);
	}
 
开发者ID:jugglemaster,项目名称:JuggleMasterPro,代码行数:51,代码来源:PrintJDialog.java


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