Java Code Examples for com.alee.laf.label.WebLabel#setFontSize()
The following examples show how to use
com.alee.laf.label.WebLabel#setFontSize() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ContactListView.java From desktopclient-java with GNU General Public License v3.0 | 6 votes |
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); }
Example 2
Source File: ChatListView.java From desktopclient-java with GNU General Public License v3.0 | 5 votes |
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); }
Example 3
Source File: Notifier.java From desktopclient-java with GNU General Public License v3.0 | 4 votes |
private void showNotification() { final WebDialog dialog = new WebDialog(); dialog.setUndecorated(true); dialog.setBackground(Color.BLACK); dialog.setBackground(StyleConstants.transparent); WebNotificationPopup popup = new WebNotificationPopup(PopupStyle.dark); popup.setIcon(Utils.getIcon("kontalk_small.png")); popup.setMargin(View.MARGIN_DEFAULT); popup.setDisplayTime(6000); popup.addNotificationListener(new NotificationListener() { @Override public void optionSelected(NotificationOption option) { } @Override public void accepted() { } @Override public void closed() { dialog.dispose(); } }); // content WebPanel panel = new WebPanel(); panel.setMargin(View.MARGIN_DEFAULT); panel.setOpaque(false); WebLabel title = new WebLabel("A new Message!"); title.setFontSize(View.FONT_SIZE_BIG); title.setForeground(Color.WHITE); panel.add(title, BorderLayout.NORTH); String text = "this is some message, and some longer text was added"; WebLabel message = new WebLabel(text); message.setForeground(Color.WHITE); panel.add(message, BorderLayout.CENTER); popup.setContent(panel); //popup.packPopup(); dialog.setSize(popup.getPreferredSize()); // set position on screen GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment(); GraphicsDevice gd = ge.getDefaultScreenDevice(); GraphicsConfiguration gc = gd.getDefaultConfiguration(); Rectangle screenBounds = gc.getBounds(); // get height of the task bar // doesn't work on all environments //Insets toolHeight = toolkit.getScreenInsets(popup.getGraphicsConfiguration()); int toolHeight = 40; dialog.setLocation(screenBounds.width - dialog.getWidth() - 10, screenBounds.height - toolHeight - dialog.getHeight()); dialog.setVisible(true); NotificationManager.showNotification(dialog, popup); }