本文整理汇总了Java中com.alee.extended.panel.GroupPanel.setMargin方法的典型用法代码示例。如果您正苦于以下问题:Java GroupPanel.setMargin方法的具体用法?Java GroupPanel.setMargin怎么用?Java GroupPanel.setMargin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.alee.extended.panel.GroupPanel
的用法示例。
在下文中一共展示了GroupPanel.setMargin方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: 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);
}
示例4: 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);
}
示例5: 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);
}
示例6: 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);
}