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


Java JProgressBar.setStringPainted方法代码示例

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


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

示例1: showUpgradeDialog

import javax.swing.JProgressBar; //导入方法依赖的package包/类
private static boolean showUpgradeDialog (final File source, String note) {
       Util.setDefaultLookAndFeel();

JPanel panel = new JPanel(new BorderLayout());
panel.add(new AutoUpgradePanel (source.getAbsolutePath (), note), BorderLayout.CENTER);
JProgressBar progressBar = new JProgressBar(0, 100);
progressBar.setValue(0);
progressBar.setStringPainted(true);
progressBar.setIndeterminate(true);
panel.add(progressBar, BorderLayout.SOUTH);
progressBar.setVisible(false);

JButton bYES = new JButton("Yes");
bYES.setMnemonic(KeyEvent.VK_Y);
JButton bNO = new JButton("No");
bNO.setMnemonic(KeyEvent.VK_N);
JButton[] options = new JButton[] {bYES, bNO};
       JOptionPane p = new JOptionPane (panel, JOptionPane.QUESTION_MESSAGE, JOptionPane.YES_NO_OPTION, null, options, bYES);
       JDialog d = Util.createJOptionProgressDialog(p, NbBundle.getMessage (AutoUpgrade.class, "MSG_Confirmation_Title"), source, progressBar);
       d.setVisible (true);

       return new Integer (JOptionPane.YES_OPTION).equals (p.getValue ());
   }
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:24,代码来源:AutoUpgrade.java

示例2: createProgressPanel

import javax.swing.JProgressBar; //导入方法依赖的package包/类
Dialog createProgressPanel(final String message, BoundedRangeModel model) {
    Dialog dialog;
    JPanel panel = new JPanel();
    panel.setLayout(new BorderLayout(10, 10));
    panel.setBorder(new EmptyBorder(15, 15, 15, 15));
    panel.add(new JLabel(message), BorderLayout.NORTH);

    final Dimension ps = panel.getPreferredSize();
    ps.setSize(Math.max(ps.getWidth(), DEFAULT_WIDTH), Math.max(ps.getHeight(), DEFAULT_HEIGHT));
    panel.setPreferredSize(ps);

    final JProgressBar progress = new JProgressBar();
    if (model == null) {
        progress.setIndeterminate(true);
    } else {
        progress.setStringPainted(true);
        progress.setModel(model);
    }
    panel.add(progress, BorderLayout.SOUTH);
    dialog = DialogDisplayer.getDefault().createDialog(new DialogDescriptor(panel, Bundle.ReferencesBrowserController_ProgressDialogCaption(), true, new Object[] {  },
                                                       DialogDescriptor.CANCEL_OPTION, DialogDescriptor.RIGHT_ALIGN,
                                                       null, null));

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

示例3: SplashScreen

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
 * Constructor
 *
 * @throws HeadlessException
 */
public SplashScreen(final JFrame parent, final boolean showImage, final int startupStepsCount) throws HeadlessException {
	super(parent, ModalityType.APPLICATION_MODAL);
	final String version = Resources.getVersion();
	if (showImage) {
		final Image image = Resources.getImageIcon("splashscreen.jpg").getImage();
		getContentPane().add(new ImageComponent(image, new String[] { "Open Visual Traceroute", version + "                   Leo Lewis" }), BorderLayout.CENTER);
	}
	_progress = new JProgressBar(1, startupStepsCount);
	_progress.setIndeterminate(false);
	_progress.setStringPainted(true);
	_progress.setPreferredSize(new Dimension(500, _progress.getPreferredSize().height));
	getContentPane().add(_progress, BorderLayout.SOUTH);
	setFocusable(false);
	setUndecorated(true);
	pack();
	setLocationRelativeTo(null);
}
 
开发者ID:leolewis,项目名称:openvisualtraceroute,代码行数:23,代码来源:SplashScreen.java

示例4: FooterBar

import javax.swing.JProgressBar; //导入方法依赖的package包/类
public FooterBar() {
	
	setPreferredSize(new Dimension(640, 16));
	setLayout(new GridLayout());
	setBorder(new BevelBorder(BevelBorder.LOWERED));
	
	Border margin = new EmptyBorder(0, 5, 0, 5);
	
	label = new JLabel("Ready", SwingConstants.LEFT);
	label.setBorder(margin);
	add(label);
	
	progress = new JProgressBar();
	progress.setMaximum(6);
	progress.setStringPainted(true);
	progress.setPreferredSize(new Dimension(10, 16));
	progress.setValue(0);
	add(progress);
	
}
 
开发者ID:condolent,项目名称:USB3Installer,代码行数:21,代码来源:FooterBar.java

示例5: setupInstance

import javax.swing.JProgressBar; //导入方法依赖的package包/类
protected void setupInstance(JProgressBar instance) {
    super.setupInstance(instance);
    
    instance.setBorderPainted(paintBorder);
    if (model != null) instance.setModel(model.createInstance());
    if (progressString != null) instance.setString(progressString);
    instance.setStringPainted(paintString);
    instance.setIndeterminate(indeterminate);
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:10,代码来源:JComponentBuilders.java

示例6: createWholeProgress

import javax.swing.JProgressBar; //导入方法依赖的package包/类
private JProgressBar createWholeProgress(int total)
{
	whole = new JProgressBar(0, total);
	whole.setValue(0);
	whole.setStringPainted(true);
	whole.setForeground(new Color(153, 153, 204));
	whole.setBackground(Color.white);

	return whole;
}
 
开发者ID:equella,项目名称:Equella,代码行数:11,代码来源:ProgressWindow.java

示例7: createCurrentProgress

import javax.swing.JProgressBar; //导入方法依赖的package包/类
private JProgressBar createCurrentProgress()
{
	current = new JProgressBar(0, 0);
	current.setValue(0);
	current.setStringPainted(true);
	current.setForeground(new Color(153, 153, 204));
	current.setBackground(Color.white);

	return current;
}
 
开发者ID:equella,项目名称:Equella,代码行数:11,代码来源:ProgressWindow.java

示例8: Downloading

import javax.swing.JProgressBar; //导入方法依赖的package包/类
public void Downloading(int n) {
	MAX = n;

	JPanel labelPanel = new JPanel(new FlowLayout());
	JLabel label = new JLabel("Downloading...");
	label.setFont(new Font("Sans Serif", Font.PLAIN, 15));
	labelPanel.add(label);
	labelPanel.setBorder(new EmptyBorder(4, 0, 4, 0));
	labelPanel.setBackground(Color.WHITE);

	JPanel progressPanel = new JPanel(new BorderLayout());
	progress = new JProgressBar(0, MAX);
	progress.setStringPainted(true);
	progress.setForeground(Value.TRUE_COLOR);
	progressPanel.add(progress);
	progressPanel.setBorder(new EmptyBorder(0, 10, 4, 10));
	progressPanel.setBackground(Color.WHITE);

	JPanel buttonPanel = new JPanel(new FlowLayout());
	buttonPanel.add(cancel);
	buttonPanel.setBackground(Color.WHITE);

	JPanel updatePanel = new JPanel(new BorderLayout());
	updatePanel.add(labelPanel, BorderLayout.NORTH);
	updatePanel.add(progressPanel, BorderLayout.CENTER);
	updatePanel.add(buttonPanel, BorderLayout.SOUTH);

	this.getContentPane().add(updatePanel, BorderLayout.CENTER);
}
 
开发者ID:LogisimIt,项目名称:Logisim,代码行数:30,代码来源:UpdateScreen.java

示例9: StatusBar

import javax.swing.JProgressBar; //导入方法依赖的package包/类
public StatusBar(boolean showProgressBar) {
	GridBagLayout layout = new GridBagLayout();
	setLayout(layout);
	GridBagConstraints constraints = new GridBagConstraints();

	constraints.fill = GridBagConstraints.HORIZONTAL;

	constraints.weightx = 1;
	constraints.gridwidth = 1;
	constraints.insets = new Insets(0, 5, 0, 0);
	layout.setConstraints(operatorLabel, constraints);
	add(operatorLabel);

	constraints.weightx = 0;
	constraints.fill = GridBagConstraints.NONE;
	constraints.gridwidth = GridBagConstraints.RELATIVE;
	constraints.insets = new Insets(0, 0, 1, 5);

	progressBar = new JProgressBar() {

		private static final long serialVersionUID = 1L;

		@Override
		public Dimension getPreferredSize() {
			Dimension size = super.getPreferredSize();
			return new Dimension(500, size.height + 5);
		}

		@Override
		public boolean isStringPainted() {
			// the status bar progress bar needs to be of the same height regardless so we
			// always pretend we paint the label because that affects its height
			return true;
		}
	};
	progressBar.putClientProperty(RapidLookTools.PROPERTY_PROGRESSBAR_COMPRESSED, true);
	if (showProgressBar) {
		progressBar.setStringPainted(false);
		progressBar.setEnabled(false);
		progressBar.setOpaque(false);
		progressBar.addMouseListener(new MouseAdapter() {

			@Override
			public void mouseClicked(MouseEvent e) {
				if (e.getClickCount() == 2) {
					if (!ProgressThreadDialog.getInstance().isVisible()) {
						ProgressThreadDialog.getInstance().setVisible(true, true);
					}
				}
			}
		});

		layout.setConstraints(progressBar, constraints);
		add(progressBar);
	}
}
 
开发者ID:transwarpio,项目名称:rapidminer,代码行数:57,代码来源:StatusBar.java

示例10: initGUI

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
 * Initialize all gui related stuff
 */
private void initGUI() {
	// Sets default title, close operation and dimensions
	this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
	this.setIconImage(JMTImageLoader.loadImage("Results").getImage());
	this.centerWindow(CommonConstants.MAX_GUI_WIDTH_JSIM_RESULTS, CommonConstants.MAX_GUI_HEIGHT_JSIM_RESULTS);

	// Creates all tabs
	JTabbedPane mainPanel = new JTabbedPane();
	this.getContentPane().setLayout(new BorderLayout());
	this.getContentPane().add(mainPanel, BorderLayout.CENTER);
	addTabPane(mainPanel, SimulationDefinition.MEASURE_QL, DESCRIPTION_QUEUE_LENGTH, results.getQueueLengthMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_QT, DESCRIPTION_QUEUE_TIME, results.getQueueTimeMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_RP, DESCRIPTION_RESPONSE_TIME, results.getResponseTimeMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_RD, DESCRIPTION_RESIDENCE_TIME, results.getResidenceTimeMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_U, DESCRIPTION_UTILIZATION, results.getUtilizationMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_X, DESCRIPTION_THROUGHPUT, results.getThroughputMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_DR, DESCRIPTION_DROP_RATE, results.getDropRateMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_S_CN, DESCRIPTION_SYSTEM_CUSTOMER_NUMBER, results.getSystemCustomerNumberMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_S_RP, DESCRIPTION_SYSTEM_RESPONSE_TIME, results.getSystemResponseTimeMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_S_X, DESCRIPTION_SYSTEM_THROUGHPUT, results.getSystemThroughputMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_S_DR, DESCRIPTION_SYSTEM_DROP_RATE, results.getSystemDropRateMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_S_P, DESCRIPTION_SYSTEM_POWER, results.getSystemPowerMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_RP_PER_SINK, DESCRIPTION_RESPONSE_TIME_PER_SINK, results.getResponsetimePerSinkMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_X_PER_SINK, DESCRIPTION_THROUGHPUT_PER_SINK, results.getThroughputPerSinkMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_FCR_TW, DESCRIPTION_FCR_TOTAL_WEIGHT, results.getFCRTotalWeightMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_FCR_MO, DESCRIPTION_FCR_MEMORY_OCCUPATION, results.getFCRMemoryOccupationMeasures());	
	addTabPane(mainPanel, SimulationDefinition.MEASURE_FJ_CN, DESCRIPTION_FJ_CUSTOMER_NUMBER, results.getFJCustomerNumberMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_FJ_RP, DESCRIPTION_FJ_RESPONSE_TIME, results.getFJResponseTimeMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_FX, DESCRIPTION_FIRING_THROUGHPUT, results.getFiringThroughputMeasures());
	// Creates bottom toolbar
	JToolBar toolbar = new JToolBar();
	toolbar.setFloatable(false);
	toolbar.setRollover(true);
	start = new JButton();
	toolbar.add(start);
	start.setVisible(false);
	pause = new JButton();
	toolbar.add(pause);
	pause.setVisible(false);
	stop = new JButton();
	toolbar.add(stop);
	stop.setVisible(false);
	// Adds a progress bar
	progressBar = new JProgressBar();
	progressBar.setStringPainted(true);
	progressBar.setForeground(Color.BLUE);
	UIManager.put("ProgressBar.selectionForeground", Color.WHITE);
	setProgressBar(results.getProgress(), results.getElapsedTime());
	toolbar.add(progressBar);
	// Add close window button
	JButton close = new JButton();
	close.setIcon(JMTImageLoader.loadImage("Close"));
	close.setFocusPainted(false);
	close.setContentAreaFilled(false);
	close.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
	close.setRolloverIcon(JMTImageLoader.loadImage("CloseRO"));
	close.setPressedIcon(JMTImageLoader.loadImage("CloseP"));
	close.setVisible(true);
	close.setToolTipText("Closes this window");
	close.addActionListener(new ActionListener() {
		// Fires a window closing event
		public void actionPerformed(ActionEvent e) {
			ResultsWindow.this.dispatchEvent(new WindowEvent(ResultsWindow.this, WindowEvent.WINDOW_CLOSING));
		}
	});

	toolbar.add(close);
	// Adds toolbar
	this.getContentPane().add(toolbar, BorderLayout.SOUTH);

	// Adds listener for progressBar
	results.setProgressListener(new MeasureDefinition.ProgressListener() {
		public void progressChanged(double progress, long elapsedTime) {
			setProgressBar(progress, elapsedTime);
		}
	});
}
 
开发者ID:max6cn,项目名称:jmt,代码行数:81,代码来源:ResultsWindow.java

示例11: initGUI

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
 * Initialize allgui related stuff
 */
private void initGUI() {
	// Sets default title, close operation and dimensions
	this.setDefaultCloseOperation(WindowConstants.HIDE_ON_CLOSE);
	this.setTitle("Simulation Results...");
	this.setIconImage(JMTImageLoader.loadImage("Results").getImage());
	int width = 800, height = 500;
	this.centerWindow(width, height);

	// Creates all tabs
	JTabbedPane mainPanel = new JTabbedPane();
	this.getContentPane().setLayout(new BorderLayout());
	this.getContentPane().add(mainPanel, BorderLayout.CENTER);
	addTabPane(mainPanel, "Number of Customers", DESCRIPTION_QUEUELENGTHS, results.getQueueLengthMeasures());
	addTabPane(mainPanel, "Queue Time", DESCRIPTION_QUEUETIMES, results.getQueueTimeMeasures());
	addTabPane(mainPanel, "Residence Time", DESCRIPTION_RESIDENCETIMES, results.getResidenceTimeMeasures());
	addTabPane(mainPanel, "Response Time", DESCRIPTION_RESPONSETIMES, results.getResponseTimeMeasures());
	addTabPane(mainPanel, "Utilization", DESCRIPTION_UTILIZATIONS, results.getUtilizationMeasures());
	addTabPane(mainPanel, "Throughput", DESCRIPTION_THROUGHPUTS, results.getThroughputMeasures());
	addTabPane(mainPanel, "Drop Rate", DESCRIPTION_DROPRATE, results.getDropRateMeasures());
	addTabPane(mainPanel, "System Response Time", DESCRIPTION_SYSTEMRESPONSETIMES, results.getSystemResponseTimeMeasures());
	addTabPane(mainPanel, "System Throughput", DESCRIPTION_SYSTEMTHROUGHPUTS, results.getSystemThroughputMeasures());
	addTabPane(mainPanel, "System Drop Rate", DESCRIPTION_DROPRATE, results.getSystemDropRateMeasures());
	addTabPane(mainPanel, "System Number of Customers", DESCRIPTION_CUSTOMERNUMBERS, results.getCustomerNumberMeasures());
	//Added by ASHANKA START
	//Adds the System Power panel in the results window
	addTabPane(mainPanel, "System Power", DESCRIPTION_SYSTEMPOWER, results.getSystemPowerMeasures());
	//Added by ASHANKA STOP
	addTabPane(mainPanel, SimulationDefinition.MEASURE_R_PER_SINK, DESCRIPTION_RESPONSETIME_SINK, results.getResponsetimePerSinkMeasures());
	addTabPane(mainPanel, SimulationDefinition.MEASURE_X_PER_SINK, DESCRIPTION_THROUGHPUT_SINK, results.getThroughputPerSinkMeasures());
	// Creates bottom toolbar
	JToolBar toolbar = new JToolBar();
	toolbar.setFloatable(false);
	toolbar.setRollover(true);
	start = new JButton();
	toolbar.add(start);
	start.setVisible(false);
	pause = new JButton();
	toolbar.add(pause);
	pause.setVisible(false);
	stop = new JButton();
	toolbar.add(stop);
	stop.setVisible(false);
	// Adds a progress bar
	progressBar = new JProgressBar();
	progressBar.setStringPainted(true);
	progressBar.setForeground(Color.BLUE);
	setProgressBar(results.getProgressTime());
	toolbar.add(progressBar);
	// Add close window button
	JButton close = new JButton();
	close.setIcon(JMTImageLoader.loadImage("Close"));
	close.setFocusPainted(false);
	close.setContentAreaFilled(false);
	close.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 0));
	close.setRolloverIcon(JMTImageLoader.loadImage("CloseRO"));
	close.setPressedIcon(JMTImageLoader.loadImage("CloseP"));
	close.setVisible(true);
	close.setToolTipText("Closes this window");
	close.addActionListener(new ActionListener() {
		// Fires a window closing event
		public void actionPerformed(ActionEvent e) {
			ResultsWindow.this.dispatchEvent(new WindowEvent(ResultsWindow.this, WindowEvent.WINDOW_CLOSING));
		}
	});

	toolbar.add(close);
	// Adds toolbar
	this.getContentPane().add(toolbar, BorderLayout.SOUTH);

	// Adds listener for progressBar
	results.setProgressTimeListener(new MeasureDefinition.ProgressTimeListener() {
		public void timeChanged(double time) {
			setProgressBar(time);
		}
	});

}
 
开发者ID:HOMlab,项目名称:QN-ACTR-Release,代码行数:81,代码来源:ResultsWindow.java

示例12: ProgressDialog

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
* @param parentFrame  The parent frame.
* @param title The dialog title.
* @param modal  True if you want a modal dialog.
*/
private ProgressDialog(Frame parentFrame, String title) {
  //----------------------- modal
  super(parentFrame, title, true);
  
  setLocationRelativeTo(parentFrame);
  
  getOkButton().setVisible(false);
  
  JPanel mainPanel = new JPanel(new GridBagLayout());
  progressBar = new JProgressBar();
  label = new JLabel(resourceBundle.getMessage(Tags.PROGRESS_DIALOG_LABEL));
  
  progressBar.setValue(0);
  progressBar.setStringPainted(true);
  progressBar.setSize(300, 100);
  
  GridBagConstraints gbc1 = new GridBagConstraints();
  gbc1.gridx = 0;
  gbc1.gridy = 0;
  gbc1.gridwidth = 1;
  gbc1.gridheight = 1;
  gbc1.weightx = 1;
  gbc1.weighty = 1;
  gbc1.fill = GridBagConstraints.BOTH;
  gbc1.anchor = GridBagConstraints.CENTER;
  gbc1.ipadx = 10;
  gbc1.ipady = 10;
  
  GridBagConstraints gbc2 = new GridBagConstraints();
  gbc2.gridx = 0;
  gbc2.gridy = 1;
  gbc2.gridwidth = 1;
  gbc2.gridheight = 1;
  gbc2.weightx = 1;
  gbc2.weighty = 1;
  gbc2.fill = GridBagConstraints.BOTH;
  gbc2.anchor = GridBagConstraints.CENTER;
  gbc2.ipadx = 10;
  gbc2.ipady = 10;
  
  mainPanel.add(label, gbc1);
  mainPanel.add(progressBar, gbc2);
  
  getContentPane().add(mainPanel, BorderLayout.CENTER);
  
  pack();
  setResizable(true);

  scheduleStart();
}
 
开发者ID:oxygenxml,项目名称:oxygen-dita-translation-package-builder,代码行数:56,代码来源:ProgressDialog.java

示例13: KeyGenPane

import javax.swing.JProgressBar; //导入方法依赖的package包/类
/**
 * Create the panel.
 */
public KeyGenPane(User user)
{
	this.name = user.getUser();
	this.mail = user.getMail();
	this.pass = user.getPassword();

	bgTask = new BackgroundTask();
	progressBar = new JProgressBar();
	progressBar.setStringPainted(true);
	progressBar.setMaximum(100);
	progressBar.setMinimum(0);
	progressBar.setValue(1);
	JLabel taskLabel = new JLabel(
			"<html>Bitte haben Sie einen Augenblick Geduld. <br>Die Schlüssel werden generiert.</html>");

	button = new JButton("Start");
	button.setActionCommand("weiter");
	button.addActionListener(new ActionHandler());
	button.setEnabled(true);

	JButton btnNewButton = new JButton("abbrechen");
	GroupLayout groupLayout = new GroupLayout(this);
	groupLayout.setHorizontalGroup(groupLayout.createParallelGroup(Alignment.TRAILING).addGroup(groupLayout
			.createSequentialGroup()
			.addGroup(groupLayout.createParallelGroup(Alignment.LEADING)
					.addGroup(groupLayout.createSequentialGroup().addContainerGap().addComponent(btnNewButton)
							.addPreferredGap(ComponentPlacement.RELATED, 236, Short.MAX_VALUE).addComponent(button))
					.addGroup(groupLayout.createSequentialGroup().addContainerGap().addComponent(taskLabel,
							GroupLayout.DEFAULT_SIZE, 426, Short.MAX_VALUE))
					.addGroup(groupLayout.createSequentialGroup().addGap(67).addComponent(progressBar,
							GroupLayout.PREFERRED_SIZE, 317, GroupLayout.PREFERRED_SIZE)))
			.addContainerGap()));
	groupLayout
			.setVerticalGroup(
					groupLayout.createParallelGroup(Alignment.TRAILING)
							.addGroup(
									groupLayout.createSequentialGroup().addGap(63).addComponent(taskLabel)
											.addPreferredGap(ComponentPlacement.RELATED, 99, Short.MAX_VALUE)
											.addComponent(progressBar, GroupLayout.PREFERRED_SIZE,
													GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
											.addGap(57)
											.addGroup(groupLayout.createParallelGroup(Alignment.BASELINE)
													.addComponent(button).addComponent(btnNewButton))
											.addContainerGap()));
	setLayout(groupLayout);
}
 
开发者ID:AnonymOnline,项目名称:saveOrganizer,代码行数:50,代码来源:KeyGenPane.java

示例14: getContentPanel

import javax.swing.JProgressBar; //导入方法依赖的package包/类
private JPanel getContentPanel() {            
    
    JPanel contentPanel1 = new JPanel();
    
    connectorGroup = new ButtonGroup();
    welcomeTitle = new JLabel();
    jPanel1 = new JPanel();
    blankSpace = new JLabel();
    progressSent = new JProgressBar();
    progressDescription = new JLabel();
    anotherBlankSpace = new JLabel();
    yetAnotherBlankSpace1 = new JLabel();
    jLabel1 = new JLabel();

    contentPanel1.setLayout(new java.awt.BorderLayout());

    welcomeTitle.setText("Now we will pretend to send this data somewhere for approval...");
    contentPanel1.add(welcomeTitle, java.awt.BorderLayout.NORTH);

    jPanel1.setLayout(new java.awt.GridLayout(0, 1));

    jPanel1.add(blankSpace);

    progressSent.setStringPainted(true);
    jPanel1.add(progressSent);

    progressDescription.setFont(new java.awt.Font("MS Sans Serif", 1, 11));
    progressDescription.setText("Connecting to Server...");
    jPanel1.add(progressDescription);

    jPanel1.add(anotherBlankSpace);

    jPanel1.add(yetAnotherBlankSpace1);

    contentPanel1.add(jPanel1, java.awt.BorderLayout.CENTER);

    jLabel1.setText("After the sending is completed, the Back and Finish buttons will enable below.");
    contentPanel1.add(jLabel1, java.awt.BorderLayout.SOUTH);
    
    return contentPanel1;
}
 
开发者ID:SarutaSan72,项目名称:Yass,代码行数:42,代码来源:TestPanel3.java

示例15: ProgressDialog

import javax.swing.JProgressBar; //导入方法依赖的package包/类
public ProgressDialog(JFrame parentFrame) {
	super(parentFrame, "", true);
	translator = Translator.getInstance();
	setTitle(translator.getTranslation(Tags.CLONE_PROGRESS_DIALOG_TITLE));
	
	noteLabel = new JLabel();

	progressBar = new JProgressBar();
	progressBar.setStringPainted(false);
	progressBar.setIndeterminate(true);

	JPanel panel = new JPanel(new GridBagLayout());

	GridBagConstraints gbc = new GridBagConstraints();

	gbc.gridx = 0;
	gbc.gridy = 0;
	gbc.insets = new Insets(0, 15, 5, 15);
	gbc.fill = GridBagConstraints.HORIZONTAL;
	gbc.anchor = GridBagConstraints.NORTHWEST;
	panel.add(new JLabel(), gbc);

	gbc.gridy++;
	gbc.weightx = 1;
	gbc.weighty = 1;
	gbc.insets = new Insets(0, 5, 0, 5);
	panel.add(progressBar, gbc);

	gbc.gridy++;
	gbc.weightx = 0;
	gbc.insets = new Insets(0, 5, 10, 5);
	panel.add(noteLabel, gbc);

	add(panel);

	getOkButton().setVisible(false);

	pack();
	setLocationRelativeTo(parentFrame);
	setMinimumSize(new Dimension(370, 150));
	setResizable(false);

}
 
开发者ID:oxygenxml,项目名称:oxygen-git-plugin,代码行数:44,代码来源:ProgressDialog.java


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