本文整理汇总了Java中org.jdesktop.swingx.JXBusyLabel.setBusy方法的典型用法代码示例。如果您正苦于以下问题:Java JXBusyLabel.setBusy方法的具体用法?Java JXBusyLabel.setBusy怎么用?Java JXBusyLabel.setBusy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.jdesktop.swingx.JXBusyLabel
的用法示例。
在下文中一共展示了JXBusyLabel.setBusy方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createImportInProgressPane
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private JComponent createImportInProgressPane() {
JLabel infoLabel = new JLabel( NbBundle.getMessage( ProgressTrackingPanel.class, "ProgressTrackingPanel.importInProgressMessage" ) );
infoLabel.setAlignmentX(0.5f);
JXBusyLabel busyLabel = new JXBusyLabel( new Dimension(48, 48) );
busyLabel.setAlignmentX(0.5f);
busyLabel.setBusy(true);
JPanel p1 = new JPanel();
p1.setLayout(new BoxLayout(p1, BoxLayout.PAGE_AXIS));
p1.add(infoLabel);
p1.add(Box.createVerticalStrut(20));
p1.add(busyLabel);
return p1;
}
示例2: PanelBusy
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
public PanelBusy() {
setLayout(new BorderLayout(196, 0));
setPreferredSize(new Dimension(589,250));
logo = ImageUtilities.loadImage(R.IMAGE_LOGO);
busyLabel = new JXBusyLabel(new Dimension(50, 50));
busyLabel.setName("busyLabel");
busyLabel.getBusyPainter().setHighlightColor(new Color(44, 61, 146).darker());
busyLabel.getBusyPainter().setBaseColor(new Color(168, 204, 241).brighter());
busyLabel.setBusy(true);
busyLabel.setDelay(40);
busyLabel.getBusyPainter().setPoints(18);
busyLabel.getBusyPainter().setTrailLength(5);
add(new JLabel(),BorderLayout.WEST);
add(new JLabel(),BorderLayout.EAST);
add(busyLabel,BorderLayout.CENTER);
}
示例3: showBusyLabel
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
protected void showBusyLabel(JComponent comp) {
if(glassPane == null) {
glassPane = new JPanel();
glassPane.setLayout(null);
setGlassPane(glassPane);
busyLabel = new JXBusyLabel();
Rectangle consoleBounds = comp.getBounds();
Rectangle rect = SwingUtilities.convertRectangle(comp.getParent(), consoleBounds, glassPane);
Rectangle busyBounds =
new Rectangle(rect.x + rect.width - busyLabel.getPreferredSize().width-20,
rect.y+10,
busyLabel.getPreferredSize().width,
busyLabel.getPreferredSize().height);
busyLabel.setBounds(busyBounds);
glassPane.setOpaque(false);
glassPane.add(busyLabel);
}
glassPane.setVisible(true);
busyLabel.setBusy(true);
}
示例4: createGlassPane
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
/**
* Create the glassPane which will be used as an overlay for the dialog while we are waiting for downloads.
*
* @return The {@link javax.swing.JPanel} for the glassPane.
*/
private JPanel createGlassPane() {
String strMessage = "<html>Warte auf Abschluss der Downloads...";
if (isShutdownRequested()) {
strMessage += "<br><b>Der Rechner wird danach heruntergefahren.</b>";
}
strMessage += "<br>Sie können den Vorgang mit Escape abbrechen.</html>";
JPanel panel = new JPanel();
panel.setLayout(new BorderLayout(5, 5));
JXBusyLabel lbl = new JXBusyLabel();
lbl.setText(strMessage);
lbl.setBusy(true);
lbl.setVerticalAlignment(SwingConstants.CENTER);
lbl.setHorizontalAlignment(SwingConstants.CENTER);
panel.add(lbl, BorderLayout.CENTER);
return panel;
}
示例5: buildVersionCheckPanel
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private Component buildVersionCheckPanel() {
final JXBusyLabel spinner = new JXBusyLabel(new Dimension(40,40));
spinner.setBusy(true);
final FlowLabel label =
new FlowLabel(Resources.getString("BugDialog.collecting_details"));
final JPanel panel = new JPanel(
new MigLayout("", "", "[]push[]push"));
panel.add(label, "cell 0 0, growx, pushx");
panel.add(spinner, "cell 0 1, align center");
return panel;
}
示例6: buildSendingBugReportPanel
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private Component buildSendingBugReportPanel() {
final JXBusyLabel spinner = new JXBusyLabel(new Dimension(40,40));
spinner.setBusy(true);
final FlowLabel label =
new FlowLabel(Resources.getString("BugDialog.sending_bug_report"));
final JPanel panel = new JPanel(
new MigLayout("", "", "[]push[]push"));
panel.add(label, "cell 0 0, growx, pushx");
panel.add(spinner, "cell 0 1, align center");
return panel;
}
示例7: init
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private void init() {
setDefaultCloseOperation(DISPOSE_ON_CLOSE);
busyLabel = new JXBusyLabel();
busyLabel.setText(getTitle());
busyLabel.setBusy(true);
add(busyLabel);
pack();
setSize(new Dimension(300, getBounds().height));
setLocationRelativeTo(this);
setResizable(false);
}
示例8: finish
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
@Override
public void finish() {
final JPanel glassPane = new JPanel();
glassPane.setLayout(null);
glassPane.setOpaque(false);
final Rectangle exportsRect = exportsTree.getBounds();
final JXBusyLabel busyLabel = new JXBusyLabel(new Dimension(32, 32));
final Point busyPoint = new Point( (exportsRect.x + exportsRect.width) - 42, 10);
busyLabel.setLocation(busyPoint);
glassPane.add(busyLabel);
final PhonTaskListener busyListener = new PhonTaskListener() {
@Override
public void statusChanged(PhonTask task, TaskStatus oldstatus, TaskStatus status) {
if(status == TaskStatus.RUNNING) {
busyLabel.setBusy(true);
glassPane.setVisible(true);
} else if(status == TaskStatus.FINISHED) {
busyLabel.setBusy(false);
glassPane.setVisible(false);
generateTask.removeTaskListener(this);
TextGridExportWizard.super.finish();
}
}
@Override
public void propertyChanged(PhonTask arg0, String arg1, Object arg2,
Object arg3) {
}
};
generateTask.addTaskListener(busyListener);
final PhonWorker worker = PhonWorker.getInstance();
worker.invokeLater(generateTask);
}
示例9: init
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private void init() {
super.removeAll();
FlowLayout topLayout = new FlowLayout(FlowLayout.LEFT);
int hgap = topLayout.getHgap();
topLayout.setHgap(0);
topLayout.setVgap(0);
JPanel topPanel = new JPanel(topLayout);
topPanel.setOpaque(false);
busyLabel = new JXBusyLabel(new Dimension(16, 16));
busyLabel.setBusy(false);
super.setTopLabelText(
"<html><div style='font-size:14;'><b>" + task.getName() + "</b></div></html>");
super.getTopLabel().setBorder(BorderFactory.createEmptyBorder(5, 0, 5, 0));
topPanel.add(busyLabel);
topPanel.add(Box.createHorizontalStrut(hgap));
topPanel.add(super.getTopLabel());
add(topPanel, BorderLayout.NORTH);
add(getBottomLabel(), BorderLayout.SOUTH);
ImageIcon cancelIcn =
IconManager.getInstance().getIcon("actions/button_cancel", IconSize.SMALL);
ImageIcon cancelIcnL =
IconManager.getInstance().getIcon("actions/button_cancel", IconSize.MEDIUM);
PhonUIAction cancelAction = new PhonUIAction(this, "onCancelTask");
cancelAction.putValue(Action.NAME, "Stop task");
cancelAction.putValue(Action.SHORT_DESCRIPTION, "Shutdown task");
cancelAction.putValue(Action.SMALL_ICON, cancelIcn);
cancelAction.putValue(Action.LARGE_ICON_KEY, cancelIcnL);
addAction(cancelAction);
}
示例10: StatusBar
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private StatusBar() {
label = new JLabel("1.0.0 RC Cytherea [built on 2009-11-01]");
JXStatusBar.Constraint cStatusLabel = new JXStatusBar.Constraint();
cStatusLabel.setFixedWidth(label.getWidth());
setPreferredSize(new Dimension(10, 31));
add(label, cStatusLabel);
label = new JLabel("statusBar.text");
JXStatusBar.Constraint c2 = new JXStatusBar.Constraint();// new
// JXStatusBar.Constraint(
c2.setFixedWidth(115); // JXStatusBar.Constraint.ResizeBehavior.FILL);
add(label, c2);
AtsOperatorGraph.getInstance().addListener(this);
// tabp.getModel().addChangeListener(new ChangeListener() {
// public void stateChanged(ChangeEvent e) {
// int selectedIndex = tabp.getSelectedIndex();
// if (selectedIndex < 0)
// label.setText("No selected tab");
// else
// label.setText("Tab "
// + tabp.getTitleAt(selectedIndex)
// + " selected");
// }
// });
JPanel alphaPanel = new JPanel(new FlowLayout(FlowLayout.LEFT, 0, 0));
final JLabel alphaLabel = new JLabel("100%");
final JSlider alphaSlider = new JSlider(0, 100, 100);
alphaSlider.setFocusable(false);
alphaSlider.addChangeListener(new ChangeListener() {
public void stateChanged(ChangeEvent e) {
int currValue = alphaSlider.getValue();
alphaLabel.setText(currValue + "%");
}
});
alphaSlider.setToolTipText("Changes the global opacity. Is not Substance-specific");
alphaSlider.setPreferredSize(new Dimension(120, alphaSlider.getPreferredSize().height));
JXStatusBar.Constraint alphaPanelConstraints = new JXStatusBar.Constraint();
alphaPanelConstraints.setFixedWidth(160);
label2 = new JXBusyLabel(new Dimension(20, 20)); // createComplexBusyLabel();
label2.getBusyPainter().setBaseColor(Color.GRAY);
label2.getBusyPainter().setHighlightColor(new Color(0xF4A817));
label2.setEnabled(true);
label2.setBusy(false);
// JLabel label = new JLabel("ss");
// label.setForeground(Color.RED);
label2.putClientProperty(SubstanceLookAndFeel.COLORIZATION_FACTOR, new Double(0.0));
label2.repaint();
label2.setDelay(100);
time = new JLabel();
JXStatusBar.Constraint c3 = new JXStatusBar.Constraint();// new
// JXStatusBar.Constraint(
c3.setFixedWidth(200);
// add(new JLabel(new ImageIcon("resources/image-loading.png")), c3);
add(time, c3);
setElapsedTime(0);
// JProgressBar progbar = new JProgressBar();
// progbar.setValue(55);
// add(progbar);
}
示例11: createBusyLabelDemo
import org.jdesktop.swingx.JXBusyLabel; //导入方法依赖的package包/类
private void createBusyLabelDemo() {
setBackgroundPainter(new MattePainter(PaintUtils.BLUE_EXPERIENCE, true));
//TODO uncomment when SwingX #999 is fixed
// label = new JXBusyLabel();
label = new JXBusyLabel(new Dimension(50, 50));
label.setName("busyLabel");
label.getBusyPainter().setHighlightColor(new Color(44, 61, 146).darker());
label.getBusyPainter().setBaseColor(new Color(168, 204, 241).brighter());
label.setBusy(true);
add(label, BorderLayout.NORTH);
JPanel control = new JPanel(new VerticalLayout());
control.setName("controlPanel");
speedSlider = new JSlider();
speedSlider.setName("speedSlider");
Dictionary<Integer, JComponent> labels = new Hashtable<Integer, JComponent>();
//TODO can we fill these labels from the properties file?
labels.put(1, new JLabel("Faster"));
labels.put(50, new JLabel("Slower"));
speedSlider.setLabelTable(labels);
control.add(speedSlider);
pointsSlider = new JSlider();
pointsSlider.setName("pointsSlider");
labels = new Hashtable<Integer, JComponent>();
//TODO can we fill these labels from the properties file?
labels.put(1, new JLabel("Fewer Points"));
labels.put(50, new JLabel("More Points"));
pointsSlider.setLabelTable(labels);
control.add(pointsSlider);
trailSlider = new JSlider();
trailSlider.setName("trailSlider");
labels = new Hashtable<Integer, JComponent>();
//TODO can we fill these labels from the properties file?
labels.put(1, new JLabel("Short Trail"));
labels.put(20, new JLabel("Long Trail"));
trailSlider.setLabelTable(labels);
control.add(trailSlider);
add(control);
}