use of java.awt.Dimension in project pcgen by PCGen.
the class OpposedCheckDialog method getOpposingGroupScrollPane.
/**
*
* This method initializes opposingGroupScrollPane
*
* @return javax.swing.JScrollPane
*
*/
private Component getOpposingGroupScrollPane() {
if (opposingGroupScrollPane == null) {
opposingGroupScrollPane = new JScrollPane();
opposingGroupScrollPane.setViewportView(getOpposingGroupTable());
opposingGroupScrollPane.setPreferredSize(new Dimension(300, 100));
}
return opposingGroupScrollPane;
}
use of java.awt.Dimension in project android_frameworks_base by ResurrectionRemix.
the class UI method updateWaitDialog.
public void updateWaitDialog(String s) {
if (currentWaitDialog != null) {
((JLabel) currentWaitDialog.getContentPane().getComponent(0)).setText(s);
Dimension prefSize = currentWaitDialog.getPreferredSize();
Dimension curSize = currentWaitDialog.getSize();
if (prefSize.width > curSize.width || prefSize.height > curSize.height) {
currentWaitDialog.setSize(Math.max(prefSize.width, curSize.width), Math.max(prefSize.height, curSize.height));
currentWaitDialog.invalidate();
}
}
}
use of java.awt.Dimension in project SIMRacingApps by SIMRacingApps.
the class MainFrame method createInstance.
public static void createInstance() {
try {
Toolkit.getDefaultToolkit().setDynamicLayout(true);
System.setProperty("sun.awt.noerasebackground", "true");
// JGoodies
// menu icons
Options.setDefaultIconSize(new Dimension(16, 16));
Options.setUseNarrowButtons(false);
Options.setPopupDropShadowEnabled(true);
UIManager.setLookAndFeel(System.getProperty("os.name").toLowerCase().startsWith("windows") ? new WindowsLookAndFeel() : new PlasticXPLookAndFeel());
_instance = new MainFrame();
} catch (Exception e) {
System.err.println(e);
}
}
use of java.awt.Dimension in project pcgen by PCGen.
the class DiceBagView method setupEditMode.
/**
* <p>Sets up the editing mode; cleans components and then
* displays the editing component setup.</p>
*/
private void setupEditMode() {
cleanup();
getContentPane().add(m_center, BorderLayout.CENTER);
getContentPane().add(m_top, BorderLayout.NORTH);
m_top.add(m_topTop);
m_top.add(m_topBottom);
m_nameField.setPreferredSize(new Dimension(100, m_nameField.getPreferredSize().height));
m_topBottom.add(m_nameFieldLabel);
m_topBottom.add(m_nameField);
m_nameField.setText(m_bag.getName());
if (m_center.getLayout() instanceof DiceBagGridLayout) {
((DiceBagGridLayout) m_center.getLayout()).setRows(1);
((DiceBagGridLayout) m_center.getLayout()).setColumns(1);
}
m_center.add(m_scrollPane);
m_topTop.add(m_stopEditing);
m_topTop.add(Box.createHorizontalStrut(5));
m_topTop.add(m_deleteSelected);
m_topTop.add(Box.createHorizontalStrut(5));
m_topTop.add(m_moveUp);
m_topTop.add(Box.createHorizontalStrut(5));
m_topTop.add(m_moveDown);
m_table.setPreferredScrollableViewportSize(new Dimension(m_table.getPreferredScrollableViewportSize().width, 200));
getContentPane().validate();
pack();
}
use of java.awt.Dimension in project ACS by ACS-Community.
the class ManagerBusyDlg method initialize.
private void initialize(String msg) {
setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
msgLbl.setText(msg);
JPanel msgPnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
msgPnl.add(msgLbl);
add(msgPnl, BorderLayout.NORTH);
JProgressBar bar = new JProgressBar();
bar.setPreferredSize(new Dimension(150, 25));
add(bar, BorderLayout.CENTER);
JPanel btnPnl = new JPanel(new FlowLayout(FlowLayout.CENTER));
btnPnl.add(stopBtn);
stopBtn.addActionListener(this);
add(btnPnl, BorderLayout.SOUTH);
setLocation(50, 50);
pack();
setVisible(true);
bar.setIndeterminate(true);
}
Aggregations