public void paintForeground(java.awt.Graphics g) { super.paintForeground(g); if (mouseOver) { Object oldAntialiasing = null; if (g instanceof java.awt.Graphics2D) { oldAntialiasing = ((java.awt.Graphics2D) g).getRenderingHint(java.awt.RenderingHints.KEY_ANTIALIASING); ((java.awt.Graphics2D) g) .addRenderingHints( new java.awt.RenderingHints( java.awt.RenderingHints.KEY_ANTIALIASING, java.awt.RenderingHints.VALUE_ANTIALIAS_ON)); } java.awt.Rectangle bounds = getBounds(); for (int i = 1; i <= 2; i++) { g.setColor( new java.awt.Color( HIGHLITE.getRed(), HIGHLITE.getGreen(), HIGHLITE.getBlue(), (255 - (i - 1) * 60))); g.drawRoundRect(i, i, bounds.width - 2 * i, bounds.height - 2 * i, arcWidth, arcHeight); } if (g instanceof java.awt.Graphics2D) { ((java.awt.Graphics2D) g) .addRenderingHints( new java.awt.RenderingHints( java.awt.RenderingHints.KEY_ANTIALIASING, oldAntialiasing)); } } }
@Override public void release() { super.release(); if (componentElementPanel != null) { componentElementPanel.release(); } edu.cmu.cs.stage3.alice.authoringtool.util.GUIFactory.releaseGUI(this); }
@Override public void paintForeground(java.awt.Graphics g) { super.paintForeground(g); if (m_element != null) { if (isDisabled()) { java.awt.Rectangle bounds = new java.awt.Rectangle(0, 0, getWidth(), getHeight()); edu.cmu.cs.stage3.alice.authoringtool.util.GUIEffects.paintDisabledEffect(g, bounds); } } }
public void setToolTipText(String text) { super.setToolTipText(text); // nameLabel.setToolTipText(text); // imageLabel.setToolTipText(text); // sizeLabel.setToolTipText(text); // locationLabel.setToolTipText(text); containingPanel.setToolTipText(text); grip.setToolTipText(text); // image.setToolTipText(text); }
public void set( edu.cmu.cs.stage3.alice.core.Element element, edu.cmu.cs.stage3.alice.authoringtool.AuthoringTool authoringToolIn) { clean(); super.reset(); authoringTool = authoringToolIn; m_element = element; variableInit(); startListening(); setHeaderLabel(); updateGUI(); setDropTargets(); }
@Override public void setBackground(java.awt.Color color) { super.setBackground(color); backgroundColor = color; if (containingPanel != null) { containingPanel.setBackground(backgroundColor); } if (headerLabel != null) { headerLabel.setBackground(backgroundColor); } if (headerPanel != null) { headerPanel.setBackground(backgroundColor); } if (componentElementPanel != null) { componentElementPanel.setBackground(backgroundColor); } }