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


Java JLabel.getMinimumSize方法代码示例

本文整理汇总了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);
}
 
开发者ID:equella,项目名称:Equella,代码行数:20,代码来源:UserSelectorControlEditor.java

示例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);
}
 
开发者ID:equella,项目名称:Equella,代码行数:25,代码来源:DRMAccessControlTab.java

示例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);
}
 
开发者ID:equella,项目名称:Equella,代码行数:36,代码来源:DRMAccessControlTab.java


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