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


Java WebLabel类代码示例

本文整理汇总了Java中com.alee.laf.label.WebLabel的典型用法代码示例。如果您正苦于以下问题:Java WebLabel类的具体用法?Java WebLabel怎么用?Java WebLabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


WebLabel类属于com.alee.laf.label包,在下文中一共展示了WebLabel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: ProgressCellRenderer

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
public ProgressCellRenderer() {
	label = new WebLabel();
	incButton = new WebButton("+");
	incButton.setPreferredSize(new Dimension(30, 10));
	incButton.addActionListener(new ActionListener() {

		@Override
		public void actionPerformed(ActionEvent e) {
			System.out.println("tralala");
		}
	});
	decButton = new WebButton("-");
	decButton.setPreferredSize(new Dimension(30, 10));
	setLayout(new BorderLayout());
	add(incButton, BorderLayout.WEST);
	add(label, BorderLayout.CENTER);
	add(decButton, BorderLayout.EAST);
}
 
开发者ID:DiscoElevator,项目名称:MyMediaList,代码行数:19,代码来源:ProgressCellRenderer.java

示例2: AttachmentPanel

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
AttachmentPanel() {
    super(View.GAP_SMALL, false);

    this.add(mStatus = new WebLabel().setItalicFont());
    this.add(mAttLabel = new WebLinkLabel());

    mFileChooser = new WebFileChooser() {
        @Override
        public void approveSelection(){
            File f = getSelectedFile();
            if (f.exists()) {
                int option = JOptionPane.showConfirmDialog(this,
                        String.format(
                                Tr.tr("The file \"%s\" already exists, overwrite?"),
                                f.getName()),
                        Tr.tr("Overwrite File?"),
                        JOptionPane.OK_CANCEL_OPTION);
                if (option != JOptionPane.YES_OPTION)
                    return; // doing nothing means not approve
            }
            super.approveSelection();
        }
    };
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:25,代码来源:ComponentUtils.java

示例3: PrivacyPanel

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:25,代码来源:ConfigurationDialog.java

示例4: IntroPanel

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:18,代码来源:ImportDialog.java

示例5: showAboutDialog

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
private void showAboutDialog() {
    WebPanel aboutPanel = new WebPanel(new GridLayout(0, 1, View.GAP_SMALL, View.GAP_SMALL));
    aboutPanel.add(new WebLabel("Kontalk Java Client v" + Kontalk.VERSION));
    WebLinkLabel linkLabel = new WebLinkLabel();
    linkLabel.setLink(View.KONTALK_SITE);
    linkLabel.setText(Tr.tr("Visit kontalk.org"));
    aboutPanel.add(linkLabel);
    WebLabel soundLabel = new WebLabel(Tr.tr("Notification sound by")+" FxProSound");
    aboutPanel.add(soundLabel);
    Icon icon = Utils.getIcon("kontalk.png");
    WebOptionPane.showMessageDialog(this,
            aboutPanel,
            Tr.tr("About"),
            WebOptionPane.INFORMATION_MESSAGE,
            icon);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:17,代码来源:MainFrame.java

示例6: FlyweightContactItem

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:23,代码来源:ContactListView.java

示例7: main

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
public static void main ( final String[] args )
{
	
	SwingUtilities.invokeLater(() ->  {
		
     WebLookAndFeel.install();
     UIManagers.initialize();
  
     final CustomSkin defaultSkin = new CustomSkin ( Example.class, "ExampleSkin.xml" );
     final CustomSkin darkSkin = new CustomSkin ( Example.class, "DarkExampleSkin.xml" );
     StyleManager.setSkin ( defaultSkin );
     HotkeyManager.registerHotkey ( Hotkey.CTRL_SPACE, new HotkeyRunnable ()
     {
         @Override
         public void run ( final KeyEvent e )
         {
             StyleManager.setSkin ( StyleManager.getSkin () == defaultSkin ? darkSkin : defaultSkin );
         }
     } );
	
     final WebPanel panel = new WebPanel ( ExampleStyles.shaded, new VerticalFlowLayout ( true, true ) );
	
     final WebLabel title = new WebLabel ( ExampleStyles.title.at ( panel ), "Panel Title" );
     panel.add ( title );
	
     final WebSeparator separator = new WebSeparator ( ExampleStyles.line.at ( panel ) );
     panel.add ( separator );
	
     final WebScrollPane scrollPane = new WebScrollPane ( ExampleStyles.scroll.at ( panel ) );
     scrollPane.setHorizontalScrollBarPolicy ( WebScrollPane.HORIZONTAL_SCROLLBAR_NEVER );
     scrollPane.getViewport ().setView ( new WebTextArea ( ExampleStyles.text.at ( scrollPane ), 3, 20 ) );
     panel.add ( scrollPane );
	
     TestFrame.show ( panel );
     
	});

}
 
开发者ID:mars-sim,项目名称:mars-sim,代码行数:39,代码来源:Example.java

示例8: CellRenderer

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:13,代码来源:ComponentUtils.java

示例9: EncryptionPanel

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
EncryptionPanel() {
    mEncryptionIcon = new WebLabel();
    mEncryptionWarningIcon = new WebLabel(Utils.getIcon("ic_ui_warning.png"));

    this.add(mEncryptionIcon, BorderLayout.WEST);
    this.add(mEncryptionWarningIcon, BorderLayout.EAST);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:8,代码来源:ComponentUtils.java

示例10: MainPanel

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:40,代码来源:ConfigurationDialog.java

示例11: ResultPanel

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:30,代码来源:ImportDialog.java

示例12: FlyweightChatItem

import com.alee.laf.label.WebLabel; //导入依赖的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);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:30,代码来源:ChatListView.java

示例13: showPasswordDialog

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
void showPasswordDialog(boolean wasWrong) {
    WebPanel passPanel = new WebPanel();
    WebLabel passLabel = new WebLabel(Tr.tr("Please enter your key password:"));
    passPanel.add(passLabel, BorderLayout.NORTH);
    final WebPasswordField passField = new WebPasswordField();
    passPanel.add(passField, BorderLayout.CENTER);
    if (wasWrong) {
        WebLabel wrongLabel = new WebLabel(Tr.tr("Wrong password"));
        wrongLabel.setForeground(Color.RED);
        passPanel.add(wrongLabel, BorderLayout.SOUTH);
    }
    WebOptionPane passPane = new WebOptionPane(passPanel,
            WebOptionPane.QUESTION_MESSAGE,
            WebOptionPane.OK_CANCEL_OPTION);
    JDialog dialog = passPane.createDialog(mMainFrame, Tr.tr("Enter password"));
    dialog.setModal(true);
    dialog.addWindowFocusListener(new WindowAdapter() {
        @Override
        public void windowGainedFocus(WindowEvent e) {
            passField.requestFocusInWindow();
        }
    });
    // blocking
    LOGGER.info("asking for password…");
    dialog.setVisible(true);

    Object value = passPane.getValue();
    if (value != null && value.equals(WebOptionPane.OK_OPTION))
        mControl.connect(passField.getPassword());
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:31,代码来源:View.java

示例14: showPresenceError

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
void showPresenceError(Contact contact, RosterHandler.Error error) {
    WebPanel panel = panel(Tr.tr("Contact error"), contact);

    panel.add(new WebLabel(Tr.tr("Error:")).setBoldFont());
    String errorText = Tr.tr(error.toString());
    switch (error) {
        case SERVER_NOT_FOUND:
            errorText = Tr.tr("Server not found");
            break;
    }

    panel.add(textArea(errorText));

    NotificationManager.showNotification(mWindow, panel, NotificationOption.cancel);
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:16,代码来源:Notifier.java

示例15: confirmNewKey

import com.alee.laf.label.WebLabel; //导入依赖的package包/类
void confirmNewKey(final Contact contact, final PGPUtils.PGPCoderKey key) {
     final boolean overwriting = contact.hasKey();

    WebPanel panel = panel(overwriting ?
            Tr.tr("Received a new public key for contact") :
            Tr.tr("Public key for contact was found"), contact);

    panel.add(new WebLabel(Tr.tr("Key fingerprint:")));
    WebTextArea fpArea = Utils.createFingerprintArea();
    fpArea.setText(Utils.fingerprint(key.fingerprint));
    panel.add(fpArea);

    String expl = overwriting ?
            Tr.tr("When declining the key, communication with this contact will be blocked.") :
            Tr.tr("When accepting the key, communication with this contact will be encrypted.");
    panel.add(textArea(expl));

    WebNotificationPopup popup = NotificationManager.showNotification(mWindow, panel,
            NotificationOption.accept, NotificationOption.decline,
            NotificationOption.cancel);
    popup.setClickToClose(false);
    popup.addNotificationListener(new NotificationListener() {
        @Override
        public void optionSelected(NotificationOption option) {
            switch (option) {
                case accept :
                    mView.getControl().acceptKey(contact, key);
                    break;
                case decline :
                    if (overwriting)
                         mView.getControl().declineKey(contact);
            }
        }
        @Override
        public void accepted() {}
        @Override
        public void closed() {}
    });
}
 
开发者ID:kontalk,项目名称:desktopclient-java,代码行数:40,代码来源:Notifier.java


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