本文整理汇总了Java中org.jdesktop.swingx.JXBusyLabel类的典型用法代码示例。如果您正苦于以下问题:Java JXBusyLabel类的具体用法?Java JXBusyLabel怎么用?Java JXBusyLabel使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
JXBusyLabel类属于org.jdesktop.swingx包,在下文中一共展示了JXBusyLabel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createComplexBusyLabel
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
private static JXBusyLabel createComplexBusyLabel() {
JXBusyLabel label = new JXBusyLabel(new Dimension(340, 150));
// default is 100
label.setDelay(100);
MFMBusyPainter painter = new MFMBusyPainter(
new Ellipse2D.Double(0.0d, 0.0d, 15.0d, 15.0d),
new Ellipse2D.Double(10.0d, 10.0d, 125.0d, 125.0d));
painter.setTrailLength(64);
painter.setPoints(192);
painter.setFrame(-1);
painter.setBaseColor(MFMUI.getMFMcolor());
painter.setHighlightColor(Color.orange);
label.setPreferredSize(new Dimension(340, 150));
label.setMinimumSize(new Dimension(340, 150));
label.setIcon(new EmptyIcon(150, 150));
label.setBusyPainter(painter);
label.setFont(new Font(label.getFont().getName(), Font.BOLD, 24));
return label;
}
示例2: showBusy
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
public static void showBusy(boolean start, boolean loadData) {
progressRunning = start;
if (start) {
busyThread = new Thread() {
@Override
public void run() {
busyDialog.setLocation(screenCenterPoint.x - 150, screenCenterPoint.y - 50);
JXBusyLabel busyLabel = createComplexBusyLabel();
if (loadData) {
busyLabel.setText("<HTML>DATA<br>LOADING</HTML>");
busyLabel.setToolTipText("MFM Data Loading");
} else {
busyLabel.setText("<HTML>Parsing<br>MAME data</HTML>");
busyLabel.setToolTipText("Parsing MAME Data");
}
busyDialog.add(busyLabel);
busyLabel.setBusy(true);
busyDialog.pack();
busyDialog.setVisible(true);
}
};
busyThread.start();
} else {
busyDialog.setVisible(false);
busyDialog.dispose();
busyThread.interrupt();
busyThread = null;
}
}
示例3: 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;
}
示例4: addBasicDefaults
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
@Override
protected void addBasicDefaults(LookAndFeelAddons addon, DefaultsList defaults) {
defaults.add(JXBusyLabel.uiClassID, "org.jdesktop.swingx.plaf.basic.BasicBusyLabelUI");
defaults.add("JXBusyLabel.delay", 100);
defaults.add("JXBusyLabel.baseColor", new ColorUIResource(Color.LIGHT_GRAY));
defaults.add("JXBusyLabel.highlightColor", new ColorUIResource(UIManagerExt.getSafeColor("Label.foreground", Color.BLACK)));
float barLength = 8;
float barWidth = 4;
float height = 26;
defaults.add("JXBusyLabel.pointShape", new ShapeUIResource(
new RoundRectangle2D.Float(0, 0, barLength, barWidth,
barWidth, barWidth)));
defaults.add("JXBusyLabel.trajectoryShape", new ShapeUIResource(
new Ellipse2D.Float(barLength / 2, barLength / 2, height
- barLength, height - barLength)));
}
示例5: 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);
}
示例6: main
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
public static void main(String[] args) {
SwingUtilities.invokeLater(() -> {
JXFrame jxFrame = new JXFrame("Test JXFrame", true);
jxFrame.setPreferredSize(new Dimension(300, 200));
jxFrame.setStartPosition(JXFrame.StartPosition.CenterInScreen);
JXBusyLabel label = new JXBusyLabel();
label.setBusy(true);
JXTextField textField = new JXTextField("<html><h1>test prompt</html>");
textField.addBuddy(new JXButton("buddy"), BuddySupport.Position.LEFT);
final JXPanel jPanel = new JXPanel(new BorderLayout());
jPanel.add(label, BorderLayout.NORTH);
jPanel.add(textField, BorderLayout.CENTER);
jxFrame.getRootPaneExt().setContentPane(jPanel);
jxFrame.pack();
jxFrame.setVisible(true);
});
}
示例7: 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);
}
示例8: 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;
}
示例9: 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;
}
示例10: 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;
}
示例11: 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);
}
示例12: buildBusyLabel
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
private JXBusyLabel buildBusyLabel() {
busyLabel = new JXBusyLabel();
BusyPainter busyPainter = new BusyPainter();
busyPainter.setBaseColor(Colors.navy);
busyPainter.setHighlightColor(Colors.tableRowColor);
busyLabel.setBusyPainter(busyPainter);
busyLabel.setDelay(1);
busyLabel.setVisible(false);
return busyLabel;
}
示例13: buildBusyLabel
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
private JXBusyLabel buildBusyLabel() {
JXBusyLabel busyLabel = new JXBusyLabel();
BusyPainter busyPainter = new BusyPainter();
busyPainter.setBaseColor(Colors.navy);
busyPainter.setHighlightColor(Colors.tableRowColor);
busyLabel.setBusyPainter(busyPainter);
busyLabel.setDelay(1);
return busyLabel;
}
示例14: 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);
}
示例15: init
import org.jdesktop.swingx.JXBusyLabel; //导入依赖的package包/类
private void init() {
setLayout(new GridBagLayout());
sessionSelector = new SessionSelector();
final TitledPanel sessionPanel = new TitledPanel("Sessions");
sessionPanel.getContentContainer().setLayout(new BorderLayout());
final JScrollPane sessionScroller = new JScrollPane(sessionSelector);
sessionSelector.getModel().addTreeModelListener(treeModelListener);
sessionPanel.getContentContainer().add(sessionScroller, BorderLayout.CENTER);
final TitledPanel participantPanel = new TitledPanel("Participants");
participantSelector = new ParticipantSelector();
final JScrollPane participantScroller = new JScrollPane(participantSelector);
participantPanel.getContentContainer().setLayout(new BorderLayout());
participantPanel.getContentContainer().add(participantScroller, BorderLayout.CENTER);
participantBusyLabel = new JXBusyLabel(new Dimension(16, 16));
participantPanel.setLeftDecoration(participantBusyLabel);
final GridBagConstraints gbc = new GridBagConstraints();
gbc.gridx = 0;
gbc.gridy = 0;
gbc.weightx = 1.0;
gbc.weighty = 1.0;
gbc.gridheight = 2;
gbc.gridwidth = 1;
gbc.anchor = GridBagConstraints.WEST;
gbc.fill = GridBagConstraints.BOTH;
gbc.insets = new Insets(2, 2, 2, 2);
add(sessionPanel, gbc);
++gbc.gridx;
add(participantPanel, gbc);
}