本文整理汇总了Java中com.alee.extended.panel.GroupPanel类的典型用法代码示例。如果您正苦于以下问题:Java GroupPanel类的具体用法?Java GroupPanel怎么用?Java GroupPanel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
GroupPanel类属于com.alee.extended.panel包,在下文中一共展示了GroupPanel类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: PrivacyPanel
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
PrivacyPanel() {
GroupPanel groupPanel = new GroupPanel(View.GAP_DEFAULT, false);
groupPanel.setMargin(View.MARGIN_BIG);
groupPanel.add(new WebLabel(Tr.tr("Privacy Settings")).setBoldFont());
groupPanel.add(new WebSeparator(true, true));
mSubscriptionBox = createCheckBox(Tr.tr("Automatically grant authorization"),
Tr.tr("Automatically grant online status authorization requests from other users"),
mConf.getBoolean(Config.NET_AUTO_SUBSCRIPTION));
groupPanel.add(new GroupPanel(mSubscriptionBox, new WebSeparator()));
mChatStateBox = createCheckBox(Tr.tr("Send chatstate notification"),
Tr.tr("Send chat activity (typing,…) to other users"),
mConf.getBoolean(Config.NET_SEND_CHAT_STATE));
groupPanel.add(new GroupPanel(mChatStateBox, new WebSeparator()));
mRosterNameBox = createCheckBox(Tr.tr("Upload contact names"),
Tr.tr("Upload your contact names to the server for client synchronization"),
mConf.getBoolean(Config.NET_SEND_ROSTER_NAME));
groupPanel.add(new GroupPanel(mRosterNameBox, new WebSeparator()));
this.add(groupPanel);
}
示例2: IntroPanel
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
IntroPanel() {
GroupPanel groupPanel = new GroupPanel(View.GAP_DEFAULT, false);
groupPanel.setMargin(View.MARGIN_BIG);
groupPanel.add(new WebLabel(Tr.tr("Get Started")).setBoldFont());
groupPanel.add(new WebSeparator(true, true));
// html tag for word wrap
String text = "<html>"+
Tr.tr("Welcome to the import wizard.")+" "
+Tr.tr("To use the Kontalk desktop client you need an existing account.")+" "
+Tr.tr("Please export the personal key files from your Android device and select them on the next page.")
+"</html>";
groupPanel.add(new WebLabel(text));
this.add(groupPanel);
}
示例3: FlyweightContactItem
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
FlyweightContactItem() {
//this.setPaintFocus(true);
this.setLayout(new BorderLayout(View.GAP_DEFAULT, 0));
this.setMargin(View.MARGIN_SMALL);
mAvatar = new ComponentUtils.AvatarImage(View.AVATAR_LIST_SIZE);
this.add(mAvatar, BorderLayout.WEST);
mNameLabel = new WebLabel();
mNameLabel.setFontSize(View.FONT_SIZE_BIG);
mNameLabel.setDrawShade(true);
mStatusLabel = new WebLabel();
mStatusLabel.setForeground(Color.GRAY);
mStatusLabel.setFontSize(View.FONT_SIZE_TINY);
this.add(
new GroupPanel(View.GAP_SMALL, false,
mNameLabel,
new GroupPanel(GroupingType.fillFirst,
Box.createGlue(), mStatusLabel)
), BorderLayout.CENTER);
}
示例4: MainWindow
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
public MainWindow() {
super();
this.setTitle(AppSettings.getLocalizedString("mainWindow.title"));
this.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
this.setSize(new Dimension(MIN_WIDTH, MIN_HEIGHT));
this.setLayout(new BorderLayout());
this.getContentPane().add(new GroupPanel(false, createMenu(), createToolbar()), BorderLayout.NORTH);
centerPanel = new CenterPanel();
this.getContentPane().add(centerPanel, BorderLayout.CENTER);
this.getContentPane().add(createStatusBar(), BorderLayout.SOUTH);
}
示例5: CellRenderer
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
CellRenderer() {
mNameLabel = new WebLabel();
mRoleLabel = new WebLabel();
mRoleLabel.setForeground(View.DARK_GREEN);
this.setMargin(View.MARGIN_DEFAULT);
this.setBorder(BorderFactory.createMatteBorder(0, 0, 1, 0, Color.LIGHT_GRAY));
this.add(new GroupPanel(GroupingType.fillMiddle, View.GAP_DEFAULT,
mNameLabel, Box.createGlue(), mRoleLabel),
BorderLayout.CENTER);
}
示例6: MainPanel
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
MainPanel() {
GroupPanel groupPanel = new GroupPanel(View.GAP_DEFAULT, false);
groupPanel.setMargin(View.MARGIN_BIG);
groupPanel.add(new WebLabel(Tr.tr("Main Settings")).setBoldFont());
groupPanel.add(new WebSeparator(true, true));
mTrayBox = createCheckBox(Tr.tr("Show tray icon"),
"",
mConf.getBoolean(Config.MAIN_TRAY));
mTrayBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
mCloseTrayBox.setEnabled(e.getStateChange() == ItemEvent.SELECTED);
}
});
mCloseTrayBox = createCheckBox(Tr.tr("Close to tray"),
"",
mConf.getBoolean(Config.MAIN_TRAY_CLOSE));
mCloseTrayBox.setEnabled(mTrayBox.isSelected());
groupPanel.add(new GroupPanel(View.GAP_DEFAULT, mTrayBox, mCloseTrayBox));
mEnterSendsBox = createCheckBox(Tr.tr("Enter key sends"),
Tr.tr("Enter key sends text, Control+Enter adds new line - or vice versa"),
mConf.getBoolean(Config.MAIN_ENTER_SENDS));
groupPanel.add(new GroupPanel(mEnterSendsBox, new WebSeparator()));
mShowUserBox = createCheckBox(Tr.tr("Display yourself in contacts"),
Tr.tr("Display yourself in the contact list"),
mConf.getBoolean(Config.VIEW_USER_CONTACT));
groupPanel.add(new GroupPanel(mShowUserBox, new WebSeparator()));
mHideBlockedBox = createCheckBox(Tr.tr("Hide blocked contacts"),
Tr.tr("Hide blocked contacts in the contact list"),
mConf.getBoolean(Config.VIEW_HIDE_BLOCKED));
groupPanel.add(new GroupPanel(mHideBlockedBox, new WebSeparator()));
this.add(groupPanel);
}
示例7: ResultPanel
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
ResultPanel() {
mImporter = mView.getControl().createAccountImporter();
mImporter.addObserver(this);
GroupPanel groupPanel = new GroupPanel(View.GAP_DEFAULT, false);
groupPanel.setMargin(View.MARGIN_BIG);
groupPanel.add(new WebLabel(Tr.tr("Import results")).setBoldFont());
groupPanel.add(new WebSeparator(true, true));
mResultLabel = new WebLabel();
groupPanel.add(mResultLabel);
mErrorLabel = new WebLabel();
groupPanel.add(mErrorLabel);
mPassPanel = new ComponentUtils.PassPanel(false) {
@Override
void onValidInput() {
mFinishButton.setEnabled(true);
}
@Override
void onInvalidInput() {
mFinishButton.setEnabled(false);
}
};
groupPanel.add(mPassPanel);
this.add(groupPanel);
}
示例8: FlyweightChatItem
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
FlyweightChatItem() {
this.setLayout(new BorderLayout(View.GAP_DEFAULT, 0));
this.setMargin(View.MARGIN_DEFAULT);
mAvatar = new ComponentUtils.AvatarImage(View.AVATAR_LIST_SIZE);
this.add(mAvatar, BorderLayout.WEST);
mTitleLabel = new WebLabel();
mTitleLabel.setFontSize(View.FONT_SIZE_BIG);
mTitleLabel.setDrawShade(true);
mStatusLabel = new WebLabel();
mStatusLabel.setForeground(Color.GRAY);
mStatusLabel.setFontSize(View.FONT_SIZE_TINY);
this.add(mStatusLabel, BorderLayout.EAST);
mChatStateLabel = new WebLabel();
mChatStateLabel.setForeground(View.DARK_RED);
mChatStateLabel.setFontSize(View.FONT_SIZE_TINY);
mChatStateLabel.setBoldFont();
//mChatStateLabel.setMargin(0, 5, 0, 5);
this.add(
new GroupPanel(View.GAP_SMALL, false,
mTitleLabel,
new GroupPanel(GroupingType.fillFirst,
Box.createGlue(), mStatusLabel, mChatStateLabel)
), BorderLayout.CENTER);
}
示例9: NetworkPanel
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
NetworkPanel() {
GroupPanel groupPanel = new GroupPanel(View.GAP_DEFAULT, false);
groupPanel.setMargin(View.MARGIN_BIG);
groupPanel.add(new WebLabel(Tr.tr("Network Settings")).setBoldFont());
groupPanel.add(new WebSeparator(true, true));
mConnectStartupBox = createCheckBox(Tr.tr("Connect on startup"),
"",
mConf.getBoolean(Config.MAIN_CONNECT_STARTUP));
groupPanel.add(mConnectStartupBox);
mConnectRetryBox = createCheckBox(Tr.tr("Retry on connection failure"),
Tr.tr("Try automatic (re-)connect after connection failure"),
mConf.getBoolean(Config.NET_RETRY_CONNECT));
groupPanel.add(new GroupPanel(mConnectRetryBox, new WebSeparator()));
mRequestAvatars = createCheckBox(Tr.tr("Download profile pictures"),
Tr.tr("Download the profile pictures of your contacts"),
mConf.getBoolean(Config.NET_REQUEST_AVATARS));
groupPanel.add(new GroupPanel(mRequestAvatars, new WebSeparator()));
mImgResizeMap = new LinkedHashMap<>();
mImgResizeMap.put(-1, Tr.tr("Original"));
mImgResizeMap.put(300 * 1000, Tr.tr("Small (0.3MP)"));
mImgResizeMap.put(500 * 1000, Tr.tr("Medium (0.5MP)"));
mImgResizeMap.put(800 * 1000, Tr.tr("Large (0.8MP)"));
mMaxImgSizeBox = new WebComboBox(new ArrayList<>(mImgResizeMap.values()).toArray());
int maxImgIndex = new ArrayList<>(mImgResizeMap.keySet()).indexOf(
mConf.getInt(Config.NET_MAX_IMG_SIZE));
if (maxImgIndex >= 0)
mMaxImgSizeBox.setSelectedIndex(maxImgIndex);
TooltipManager.addTooltip(mMaxImgSizeBox, Tr.tr("Reduce size of images before sending"));
groupPanel.add(new GroupPanel(View.GAP_DEFAULT,
new WebLabel(Tr.tr("Resize image attachments:")),
mMaxImgSizeBox,
new WebSeparator()));
this.add(groupPanel);
}
示例10: ViewPanel
import com.alee.extended.panel.GroupPanel; //导入依赖的package包/类
ViewPanel() {
GroupPanel groupPanel = new GroupPanel(View.GAP_DEFAULT, false);
groupPanel.setMargin(View.MARGIN_BIG);
groupPanel.add(new WebLabel(Tr.tr("View Settings")).setBoldFont());
groupPanel.add(new WebSeparator(true, true));
String bgPath = mConf.getString(Config.VIEW_CHAT_BG);
mBGBox = createCheckBox(Tr.tr("Custom background:")+" ",
"",
!bgPath.isEmpty());
mBGBox.addItemListener(new ItemListener() {
@Override
public void itemStateChanged(ItemEvent e) {
mBGChooser.setEnabled(e.getStateChange() == ItemEvent.SELECTED);
mBGChooser.getChooseButton().setEnabled(e.getStateChange() == ItemEvent.SELECTED);
}
});
TooltipManager.addTooltip(mBGBox, Tr.tr("Background image for all chats"));
mBGChooser = Utils.createImageChooser(bgPath);
mBGChooser.setEnabled(mBGBox.isSelected());
groupPanel.add(new GroupPanel(GroupingType.fillLast, mBGBox, mBGChooser));
mMessageFontSizeMap = new LinkedHashMap<>();
mMessageFontSizeMap.put(Tr.tr("Small"), 1);
mMessageFontSizeMap.put(Tr.tr("Normal"), -1);
mMessageFontSizeMap.put(Tr.tr("Large"), 2);
mMessageFontSizeMap.put(Tr.tr("Huge"), 3);
mMessageFontSizeBox = new WebComboBox(new ArrayList<>(mMessageFontSizeMap.keySet()).toArray());
int fontSizeIndex = new ArrayList<>(mMessageFontSizeMap.values()).indexOf(
mConf.getInt(Config.VIEW_MESSAGE_FONT_SIZE));
if (fontSizeIndex >= 0)
mMessageFontSizeBox.setSelectedIndex(fontSizeIndex);
TooltipManager.addTooltip(mMessageFontSizeBox, Tr.tr("Font size for message text and date"));
groupPanel.add(new GroupPanel(View.GAP_DEFAULT,
new WebLabel(Tr.tr("Font size for chat messages:")),
mMessageFontSizeBox,
new WebSeparator()));
this.add(groupPanel);
}