private void makeTransparent() { panelCardArea.setOpaque(false); cardArea.setOpaque(false); panelCardArea.getViewport().setOpaque(false); panelControl.setBackground(new Color(250, 250, 250, 150)); panelControl.setOpaque(true); cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values())); }
public void useExtendedView(VIEW_MODE extendedViewMode) { this.extendedViewMode = extendedViewMode; int alpha = 255; switch (chatType) { case GAME: case TABLES: case DEFAULT: alpha = CHAT_ALPHA; } this.txtConversation.setExtBackgroundColor(new Color(0, 0, 0, alpha)); // Alpha = 255 not transparent this.txtConversation.setSelectionColor(Color.LIGHT_GRAY); this.jScrollPaneTxt.setOpaque(alpha == 255); this.jScrollPaneTxt.getViewport().setOpaque(chatType != ChatType.TABLES); }
public Cards(boolean skipAddingScrollPane) { initComponents(skipAddingScrollPane); setOpaque(false); //cardArea.setOpaque(false); setBackgroundColor(new Color(0, 0, 0, 100)); if (!skipAddingScrollPane) { jScrollPane1.setOpaque(false); jScrollPane1.getViewport().setOpaque(false); jScrollPane1.setBorder(EMPTY_BORDER); } if (Plugins.instance.isCardPluginLoaded()) { cardArea.setLayout(null); } cardArea.setBorder(EMPTY_BORDER); setGUISize(); }
private void makeTransparent() { this.addComponentListener(this); setOpaque(false); cardGrid.setOpaque(false); cardSelectorScrollPane.setOpaque(false); cardSelectorScrollPane.getViewport().setOpaque(false); cbSortBy.setModel(new DefaultComboBoxModel<>(SortBy.values())); cbSortBy.setSelectedItem(sortSetting.getSortBy()); jTextFieldSearch.addActionListener(searchAction); // make the components more readable tbColor.setBackground(new Color(250, 250, 250, 150)); tbColor.setOpaque(true); // false = transparent tbTypes.setBackground(new Color(250, 250, 250, 150)); tbTypes.setOpaque(true); // false = transparent cardSelectorBottomPanel.setBackground(new Color(250, 250, 250, 150)); cardSelectorBottomPanel.setOpaque(true); // false = transparent }
private void initComponents() { setOpaque(false); jPanel = new JLayeredPane(); jPanel.setLayout(null); jPanel.setOpaque(false); jScrollPane = new JScrollPane(jPanel); Border empty = new EmptyBorder(0, 0, 0, 0); jScrollPane.setBorder(empty); jScrollPane.setViewportBorder(empty); jScrollPane.setOpaque(false); jScrollPane.getViewport().setOpaque(false); this.add(jScrollPane); }
scroll.getViewport().setOpaque(false); scroll.setBorder(BorderFactory.createEmptyBorder()); scroll.setOpaque(false);
public AbilityPicker() { setSize(DIALOG_WIDTH, DIALOG_HEIGHT); initComponents(); jScrollPane2.setOpaque(false); jScrollPane2.getViewport().setOpaque(false); UIManager.put("ScrollBar.width", 17); jScrollPane2.getHorizontalScrollBar().setUI(new MageScrollbarUI()); jScrollPane2.getVerticalScrollBar().setUI(new MageScrollbarUI()); }
/** Creates new form CombatDialog */ public CombatDialog() { JPanel contentPane = new JPanel() { private static final long serialVersionUID = -8283955788355547309L; public void paintComponent(Graphics g) { g.setColor(new Color(50, 50, 50, 100)); g.fillRect(0, 0, getWidth(), getHeight()); } }; setContentPane(contentPane); initComponents(); this.setModal(false); combatArea.setOpaque(false); jScrollPane1.setOpaque(false); jScrollPane1.getViewport().setOpaque(false); getRootPane().setOpaque(false); //setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE); }
public AbilityPicker(List<Object> choices, String message) { this.choices = choices; setSize(DIALOG_WIDTH, DIALOG_HEIGHT); if (message != null) { this.message = message + " (single-click)"; } initComponents(); jScrollPane2.setOpaque(false); jScrollPane2.getViewport().setOpaque(false); UIManager.put("ScrollBar.width", 17); jScrollPane2.getHorizontalScrollBar().setUI(new MageScrollbarUI()); jScrollPane2.getVerticalScrollBar().setUI(new MageScrollbarUI()); }
public void initComponents() { hand = new mage.client.cards.Cards(true); hand.setMinOffsetY(HAND_MIN_CARDS_OFFSET_Y); hand.setCardDimension(GUISizeHelper.handCardDimension); jPanel = new JPanel(); jScrollPane1 = new JScrollPane(jPanel); jScrollPane1.getViewport().setBackground(new Color(0, 0, 0, 0)); jPanel.setLayout(new GridBagLayout()); // centers hand jPanel.setBackground(new Color(0, 0, 0, 0)); jPanel.add(hand); setOpaque(false); jPanel.setOpaque(false); jScrollPane1.setOpaque(false); jPanel.setBorder(EMPTY_BORDER); jScrollPane1.setBorder(EMPTY_BORDER); jScrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_NEVER); jScrollPane1.getHorizontalScrollBar().setUnitIncrement(8); jScrollPane1.setViewportBorder(EMPTY_BORDER); setLayout(new BorderLayout()); add(jScrollPane1, BorderLayout.CENTER); hand.setHScrollSpeed(8); hand.setBackgroundColor(new Color(0, 0, 0, 0)); hand.setVisibleIfEmpty(false); hand.setBorder(EMPTY_BORDER); hand.setZone(Zone.HAND.toString()); }
textAreaScrollPane.setOpaque(false); textAreaScrollPane.setBackground(new Color(0, 0, 0, 0)); textAreaScrollPane.getViewport().setOpaque(false);
/** * This method is called from within the constructor to initialize the form. * WARNING: Do NOT modify this code. The content of this method is always * regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); text = new javax.swing.JTextPane(); setMinimumSize(getPreferredSize()); setOpaque(false); setPreferredSize(new Dimension(dimension.frameWidth, dimension.frameHeight)); setLayout(null); jScrollPane1.setBorder(null); jScrollPane1.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); jScrollPane1.setFocusable(false); jScrollPane1.setOpaque(false); text.setBorder(null); text.setEditable(false); text.setFont(new java.awt.Font("Arial", 0, 9)); text.setFocusable(false); text.setOpaque(false); jScrollPane1.setViewportView(text); add(jScrollPane1); jScrollPane1.setBounds(20, 110, 130, 100); jScrollPane1.setBounds(new Rectangle(dimension.contentXOffset, dimension.textYOffset, dimension.textWidth, dimension.textHeight)); }// </editor-fold>//GEN-END:initComponents
/** * This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ @SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { scrollPane = new javax.swing.JScrollPane(); text = new javax.swing.JTextPane(); setFocusable(false); setMinimumSize(new Dimension(FRAME_MAX_WIDTH, FRAME_MAX_HEIGHT)); setName("bigCardPanel"); // NOI18N setOpaque(false); setPreferredSize(getMinimumSize()); setLayout(null); scrollPane.setBorder(null); scrollPane.setHorizontalScrollBarPolicy(javax.swing.ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); scrollPane.setOpaque(false); text.setEditable(false); text.setFocusable(false); text.setOpaque(false); scrollPane.setViewportView(text); add(scrollPane); scrollPane.setBounds(20, 230, 210, 120); scrollPane.setBounds(new Rectangle(CONTENT_MAX_XOFFSET, TEXT_MAX_YOFFSET, TEXT_MAX_WIDTH, TEXT_MAX_HEIGHT)); }// </editor-fold>//GEN-END:initComponents
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED); cardScroll.setOpaque(false); cardScroll.getViewport().setOpaque(false); cardScroll.setViewportBorder(BorderFactory.createEmptyBorder());
public BigCard(boolean rotated) { initComponents(); if (!Plugins.instance.isCardPluginLoaded()) { initBounds(rotated); } setDoubleBuffered(true); setOpaque(true); this.scrollPane.setOpaque(true); this.scrollPane.setVisible(false); }
jScrollPaneSystem.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); jScrollPaneSystem.setFocusable(false); jScrollPaneSystem.setOpaque(false);
private Component createDocPanel() { createTextPanel(); readmeScroller = new JScrollPane(readmePane, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); readmeScroller.setOpaque(false); return readmeScroller; }
JTextArea textArea = new JTextArea(); textArea.setOpaque(false); textArea.setBackground(new Color(red, green, blue, alpha)); JScrollPane scrollPane = new JScrollPane(textArea); scrollPane.getViewport().setOpaque(false); scrollPane.setOpaque(false);
public static JScrollPane scrolleable(final JComponent comp) { final JScrollPane scroll = new JScrollPane(); if (comp != null) { scroll.setViewportView(comp); } scroll.getVerticalScrollBar().setUnitIncrement(SCROLL_UNIT_INCREMENT); scroll.setOpaque(false); scroll.getViewport().setOpaque(false); return scroll; }
public void initComponents() { //textArea.setOpaque(false); tree.setOpaque(false); scroll.setBorder(BorderFactory.createLineBorder(Color.LIGHT_GRAY)); scroll.setOpaque(false); this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS)); this.add(scroll); this.setBorder(BorderFactory.createEmptyBorder()); this.setOpaque(false); }