本文整理匯總了Java中javax.swing.JLabel.getMinimumSize方法的典型用法代碼示例。如果您正苦於以下問題:Java JLabel.getMinimumSize方法的具體用法?Java JLabel.getMinimumSize怎麽用?Java JLabel.getMinimumSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類javax.swing.JLabel
的用法示例。
在下文中一共展示了JLabel.getMinimumSize方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: UserGroupPanel
import javax.swing.JLabel; //導入方法依賴的package包/類
public UserGroupPanel(String text, String groupText, String restrictGroupText)
{
super(text, false);
groupLabel = new JLabel(groupText);
groupList = new FilteredShuffleList<NameValue>(restrictGroupText, new FilterGroupModel(getClientService()
.getService(RemoteUserService.class)));
final int height1 = groupLabel.getMinimumSize().height;
final int height2 = groupList.getMinimumSize().height;
final int[] rows = {height1, height2};
final int[] cols = {TableLayout.FILL};
setInnerLayout(new TableLayout(rows, cols, 5, 5));
addInner(groupLabel, new Rectangle(0, 0, 1, 1));
addInner(groupList, new Rectangle(0, 1, 1, 1));
setSelected(false);
}
示例2: NetworkPanel
import javax.swing.JLabel; //導入方法依賴的package包/類
public NetworkPanel()
{
super(CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.restrictip"), //$NON-NLS-1$
false);
titleLabel = new JLabel(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.ipbased")); //$NON-NLS-1$
selectable = new JCheckBox(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.selectable")); //$NON-NLS-1$
networks = new NetworkShuffleList();
final int height1 = titleLabel.getMinimumSize().height;
final int height2 = networks.getMinimumSize().height;
final int height3 = selectable.getPreferredSize().height;
final int[] rows = {height1, height2, height3};
final int[] cols = {TableLayout.FILL};
setInnerLayout(new TableLayout(rows, cols, 5, 5));
addInner(titleLabel, new Rectangle(0, 0, 1, 1));
addInner(networks, new Rectangle(0, 1, 1, 1));
addInner(selectable, new Rectangle(0, 2, 1, 1));
setSelected(false);
}
示例3: UserGroupPanel
import javax.swing.JLabel; //導入方法依賴的package包/類
public UserGroupPanel(RemoteUserService userService)
{
super(CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.restrict"), //$NON-NLS-1$
false);
userLabel = new JLabel(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.users")); //$NON-NLS-1$
groupLabel = new JLabel(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.groups")); //$NON-NLS-1$
userList = new FilteredShuffleList<NameValue>(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.restrictusers"), //$NON-NLS-1$
new FilterUserModel(userService));
groupList = new FilteredShuffleList<NameValue>(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.restrictgroups"), //$NON-NLS-1$
new FilterGroupModel(userService));
selectable = new JCheckBox(
CurrentLocale.get("com.dytech.edge.admin.wizard.editor.drm.drmacccesscontroltab.selectable")); //$NON-NLS-1$
final int height1 = userLabel.getMinimumSize().height;
final int height2 = userList.getMinimumSize().height;
final int height3 = selectable.getPreferredSize().height;
final int[] rows = {height1, height2, height1, height2, height3};
final int[] cols = {TableLayout.FILL};
setInnerLayout(new TableLayout(rows, cols, 5, 5));
addInner(userLabel, new Rectangle(0, 0, 1, 1));
addInner(userList, new Rectangle(0, 1, 1, 1));
addInner(groupLabel, new Rectangle(0, 2, 1, 1));
addInner(groupList, new Rectangle(0, 3, 1, 1));
addInner(selectable, new Rectangle(0, 4, 1, 1));
setSelected(false);
}