Refine search
private JComponent getChooserPanel() { JPanel p = new JPanel(new BorderLayout()); p.setBorder(BorderFactory.createEmptyBorder(10, 0, 0, 0)); p.setOpaque(false); JLabel l = new JLabel("Please choose installation directory:"); l.setVerticalAlignment(JLabel.NORTH); l.setBorder(BorderFactory.createEmptyBorder(0, 0, 0, 10)); p.add(l, BorderLayout.NORTH); table = new JTable(installations); table.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); table.setColumnSelectionAllowed(false); table.setDefaultRenderer(Object.class, new InstallationTableCellRenderer()); table.getColumnModel().getColumn(0).setHeaderValue("Directory"); table.getColumnModel().getColumn(0).setPreferredWidth(300); table.getColumnModel().getColumn(1).setHeaderValue("Java Version"); table.getColumnModel().getColumn(3).setPreferredWidth(100); table.getColumnModel().getColumn(2).setHeaderValue("Type"); table.getColumnModel().getColumn(3).setPreferredWidth(100); table.getColumnModel().getColumn(3).setHeaderValue("Replaced by DCEVM?"); table.getColumnModel().getColumn(3).setPreferredWidth(200); table.getColumnModel().getColumn(4).setHeaderValue("Installed altjvm?"); table.getColumnModel().getColumn(4).setPreferredWidth(200); JScrollPane lists = new JScrollPane(table); lists.setPreferredSize(new Dimension(900, 200)); p.add(lists, BorderLayout.CENTER); return p; }
itemIcon.setVerticalAlignment(JLabel.CENTER); itemIcon.setHorizontalAlignment(JLabel.CENTER); itemIcon.setPreferredSize(new Dimension(45, 45)); itemName.setVerticalAlignment(JLabel.BOTTOM); itemName.setFont(FontManager.getRunescapeSmallFont()); offerInfo.setVerticalAlignment(JLabel.TOP); offerInfo.setFont(FontManager.getRunescapeSmallFont()); JLabel switchFaceViewIcon = new JLabel(); switchFaceViewIcon.setIcon(RIGHT_ARROW_ICON); switchFaceViewIcon.setVerticalAlignment(JLabel.CENTER); switchFaceViewIcon.setHorizontalAlignment(JLabel.CENTER); switchFaceViewIcon.setPreferredSize(new Dimension(30, 45)); itemPrice.setVerticalAlignment(JLabel.BOTTOM); itemPrice.setFont(FontManager.getRunescapeSmallFont()); offerSpent.setVerticalAlignment(JLabel.TOP); offerSpent.setFont(FontManager.getRunescapeSmallFont()); JLabel switchDetailsViewIcon = new JLabel(); switchDetailsViewIcon.setIcon(LEFT_ARROW_ICON); switchDetailsViewIcon.setVerticalAlignment(JLabel.CENTER); switchDetailsViewIcon.setHorizontalAlignment(JLabel.CENTER); switchDetailsViewIcon.setPreferredSize(new Dimension(30, 45));
labelRender.setForeground(symbolsTextColor); labelRender.setSize(symbolWidth, symbolWidth); labelRender.setVerticalAlignment(SwingConstants.CENTER); labelRender.setHorizontalAlignment(SwingConstants.CENTER);
popupMenu.add(pauseSkill); JLabel skillIcon = new JLabel(new ImageIcon(iconManager.getSkillImage(skill))); skillIcon.setHorizontalAlignment(SwingConstants.CENTER); skillIcon.setVerticalAlignment(SwingConstants.CENTER); skillIcon.setPreferredSize(new Dimension(35, 35));
public static JXPanel getDescription(CardView card, int width, int height) { JXPanel descriptionPanel = new JXPanel(); //descriptionPanel.setAlpha(.8f); descriptionPanel.setBounds(0, 0, width, height); descriptionPanel.setVisible(false); descriptionPanel.setLayout(null); //descriptionPanel.setBorder(BorderFactory.createLineBorder(Color.green)); JButton j = new JButton(""); j.setBounds(0, 0, width, height); j.setBackground(Color.black); j.setLayout(null); JLabel cardText = new JLabel(); cardText.setBounds(5, 5, width - 10, height - 10); cardText.setForeground(Color.white); cardText.setFont(cardNameFont); cardText.setVerticalAlignment(SwingConstants.TOP); j.add(cardText); TextLines textLines = GuiDisplayUtil.getTextLinesfromCardView(card); cardText.setText(getRulefromCardView(card, textLines).toString()); descriptionPanel.add(j); return descriptionPanel; }
numberLabel.setHorizontalAlignment(SwingConstants.LEFT); numberLabel.setVerticalAlignment(SwingConstants.TOP); numberLabel.setFont(ta.getFont()); numberLabel.setOpaque(false);
JLabel old = new JLabel("Previous"); old.setHorizontalAlignment(JLabel.CENTER); JLabel next = new JLabel(" Current "); next.setHorizontalAlignment(JLabel.CENTER); JLabel hexLabel = new JLabel("#"); hexInput.setBackground(ColorScheme.DARKER_GRAY_COLOR); JLabel label = new JLabel("Hex color"); label.setVerticalAlignment(JLabel.BOTTOM);
JLabel textLabel = new JLabel("Test test test test test test test..."); textLabel.setPreferredSize(new Dimension(500, 250)); textLabel.setForeground(Color.WHITE); textLabel.setFont(new Font("Courier", Font.BOLD, 30)); // sets the text to the upper left corner textLabel.setVerticalAlignment(SwingConstants.NORTH); textLabel.setBorder(new CompoundBorder( // sets two borders BorderFactory.createMatteBorder(10, 10, 10, 10, Color.WHITE), // outer border BorderFactory.createEmptyBorder(10, 10, 10, 10))); // inner invisible border as the margin
public MediaScraperComboBoxEditor() { label.setHorizontalAlignment(JLabel.LEFT); label.setVerticalAlignment(JLabel.CENTER); selectedItem = null; }
final JLabel imageLabel = new JLabel(); imageLabel.setToolTipText(buildToolTip(item)); imageLabel.setVerticalAlignment(SwingConstants.CENTER); imageLabel.setHorizontalAlignment(SwingConstants.CENTER);
public ResponseImageView(HttpPanelViewModel model) { this.model = model; imageLabel = new JLabel(); imageLabel.setVerticalAlignment(JLabel.TOP); mainPanel = new JPanel(new BorderLayout()); mainPanel.add(new JScrollPane(imageLabel)); this.model.addHttpPanelViewModelListener(this); }
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JLabel label = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); if (changeInfo.starred != null && changeInfo.starred) { label.setIcon(Git4ideaIcons.Star); } label.setHorizontalAlignment(CENTER); label.setVerticalAlignment(CENTER); return label; } };
iconWrapperLabel = new JLabel(); iconWrapperLabel.setPreferredSize(new Dimension(30, 0)); iconWrapperLabel.setVerticalAlignment(JLabel.CENTER); iconWrapperLabel.setHorizontalAlignment(JLabel.CENTER);
private JLabel getTitleLabel(String title) { JLabel label = new JLabel( String.format( "<html><div style=\"color: %s\">%s</div></html>", TITLE_COLOR, UIHelper.getFormattedText( title, TITLE_FONT_SIZE, TITLE_FONT_WEIGHT, TITLE_LINE_MARGIN))); label.setVerticalAlignment(SwingConstants.CENTER); return label; }
@Override protected void done() { background.setIcon(new ImageIcon(backgroundImage.getPath())); background.setVerticalAlignment(SwingConstants.TOP); background.setHorizontalAlignment(SwingConstants.LEFT); } }
lblCount = new javax.swing.JLabel(); lblLandCount = new javax.swing.JLabel(); lblCreatureCount = new javax.swing.JLabel(); chkPiles = new javax.swing.JCheckBox(); cbSortBy = new javax.swing.JComboBox(); lblCount.setVerifyInputWhenFocusTarget(false); lblLandCount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); lblLandCount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_land.png"))); // NOI18N lblLandCount.setText("999"); lblLandCount.setToolTipText("Number of lands."); lblLandCount.setVerticalAlignment(javax.swing.SwingConstants.TOP); lblLandCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); lblLandCount.setFocusable(false); lblLandCount.setVerifyInputWhenFocusTarget(false); lblCreatureCount.setHorizontalAlignment(javax.swing.SwingConstants.LEFT); lblCreatureCount.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/type_creatures.png"))); // NOI18N lblCreatureCount.setText("999"); lblCreatureCount.setToolTipText("Number of creatures."); lblCreatureCount.setVerticalAlignment(javax.swing.SwingConstants.TOP); lblCreatureCount.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); lblCreatureCount.setFocusable(false);
public static JLabel createLabelFor(String text, JComponent editComponent) { JLabel ret = new JLabel(); loadLabelText(ret, text); ret.setVerticalAlignment(0); ret.setLabelFor(editComponent); return ret; }
@Override public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) { JLabel labelComponent = (JLabel) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column); LabelInfo labelInfo = getLabelInfo(changeInfo); labelComponent.setIcon(getIconForLabel(labelInfo)); labelComponent.setToolTipText(getToolTipForLabel(labelInfo)); labelComponent.setHorizontalAlignment(CENTER); labelComponent.setVerticalAlignment(CENTER); return labelComponent; } };
main_card = new javax.swing.JPanel(); showCardName = new javax.swing.JCheckBox(); tooltipDelayLabel = new javax.swing.JLabel(); tooltipDelay = new javax.swing.JSlider(); showFullImagePath = new javax.swing.JCheckBox(); tooltipDelayLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); tooltipDelayLabel.setText("Delay in milliseconds for showing the card tooltip text (0 value will disable tooltip)"); tooltipDelayLabel.setToolTipText("<HTML>The time the appearance of the tooltip window for a card is delayed.<br>\nIf set to zero, the tooltip window won't be shown at all."); guiSizeBasic.add(sliderFontSize, gridBagConstraints); fontSizeLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); fontSizeLabel.setText("Tables"); fontSizeLabel.setToolTipText("<HTML>The size of the font used to display table text."); guiSizeBasic.add(sliderChatFontSize, gridBagConstraints); chatFontSizeLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); chatFontSizeLabel.setText("Chat"); chatFontSizeLabel.setToolTipText("<HTML>The size of the font used to display the chat text"); controlsDescriptionLabel.setVerticalAlignment(javax.swing.SwingConstants.TOP);
private JLabel getSampleIconLabel(String sampleImageResource) { ImageIcon originalImage = new ImageIcon(ConnectToPhotosView.class.getResource(sampleImageResource)); JLabel iconLabel = new JLabel( new ImageIcon( originalImage .getImage() .getScaledInstance( SAMPLE_IMAGE_WIDTH, SAMPLE_IMAGE_HEIGHT, Image.SCALE_SMOOTH))); iconLabel.setVerticalAlignment(SwingConstants.CENTER); iconLabel.setBorder(SAMPLE_IMAGE_PADDING); return iconLabel; }