/[svn]/jsampler/trunk/src/org/jsampler/view/fantasia/PianoKeyboardPane.java
ViewVC logotype

Diff of /jsampler/trunk/src/org/jsampler/view/fantasia/PianoKeyboardPane.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2145 by iliev, Sun Mar 29 19:10:49 2009 UTC revision 2146 by iliev, Mon Oct 11 09:31:27 2010 UTC
# Line 326  public class PianoKeyboardPane extends F Line 326  public class PianoKeyboardPane extends F
326                  }                  }
327                  index = channel.getChannelInfo().getInstrumentIndex();                  index = channel.getChannelInfo().getInstrumentIndex();
328                  updateInstrumentInfo();                  updateInstrumentInfo();
329    
330                    //modWheel.SetChannel(channel);
331          }          }
332                    
333          private void          private void
# Line 340  public class PianoKeyboardPane extends F Line 342  public class PianoKeyboardPane extends F
342                  }                  }
343                                    
344                  updateDisplay();                  updateDisplay();
345                    //modWheel.SetChannel(null);
346          }          }
347                    
348          @Override public void          @Override public void
# Line 378  public class PianoKeyboardPane extends F Line 381  public class PianoKeyboardPane extends F
381                                    
382                  Paint oldPaint = g2.getPaint();                  Paint oldPaint = g2.getPaint();
383                  Composite oldComposite = g2.getComposite();                  Composite oldComposite = g2.getComposite();
384                    
385                  Insets insets = this.getInsets();                  FantasiaPainter.paintSurface1(this, g);
                 double x1 = insets.left;  
                 double y1 = insets.top;  
                   
                 double w = getSize().getWidth();  
                 double x2 = w - insets.right - 1;  
                 double h = getSize().getHeight();  
                 double y2 = h - insets.bottom - 1;  
                   
                 FantasiaPainter.paintGradient(g2, x1, y1, x2, y2 - 10, color1, color2);  
                   
                 g2.setRenderingHint (  
                         RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_OFF  
                 );  
                   
                 double y3 = y2 - 10;  
                 if(y3 < 0) y3 = 0;  
                   
                 Rectangle2D.Double rect = new Rectangle2D.Double(x1, y3, x2 - x1 + 1, 11);  
                   
                 GradientPaint gr = new GradientPaint (  
                         0.0f, (float)y3, color2,  
                         0.0f, (float)h, color3  
                 );  
                   
                 g2.setPaint(gr);  
                 g2.fill(rect);  
                   
                 drawOutBorder(g2, x1, y1, x2, y2);  
386                                    
387                  double prX = pianoRoll.getLocation().getX();                  double prX = pianoRoll.getLocation().getX();
388                  double prY = pianoRoll.getLocation().getY();                  double prY = pianoRoll.getLocation().getY();
# Line 421  public class PianoKeyboardPane extends F Line 396  public class PianoKeyboardPane extends F
396          }          }
397                    
398          private void          private void
         drawOutBorder(Graphics2D g2, double x1, double y1, double x2, double y2) {  
                 AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.40f);  
                 g2.setComposite(ac);  
                   
                 g2.setPaint(Color.WHITE);  
                 Line2D.Double l = new Line2D.Double(x1, y1, x2, y1);  
                 g2.draw(l);  
                   
                 g2.setComposite(ac.derive(0.20f));  
                 l = new Line2D.Double(x1, y1 + 1, x2, y1 + 1);  
                 g2.draw(l);  
                   
                 g2.setComposite(ac.derive(0.255f));  
                   
                 l = new Line2D.Double(x1, y1, x1, y2);  
                 g2.draw(l);  
                   
                 g2.setComposite(ac.derive(0.40f));  
                 g2.setPaint(Color.BLACK);  
                   
                 //l = new Line2D.Double(x1, y2, x2, y2);  
                 //g2.draw(l);  
                   
                 g2.setComposite(ac.derive(0.20f));  
                   
                 l = new Line2D.Double(x2, y1, x2, y2);  
                 g2.draw(l);  
         }  
           
         private void  
399          drawInBorder(Graphics2D g2, double x1, double y1, double x2, double y2) {          drawInBorder(Graphics2D g2, double x1, double y1, double x2, double y2) {
400                  AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.40f);                  AlphaComposite ac = AlphaComposite.getInstance(AlphaComposite.SRC_OVER, 0.40f);
401                  g2.setComposite(ac);                  g2.setComposite(ac);

Legend:
Removed from v.2145  
changed lines
  Added in v.2146

  ViewVC Help
Powered by ViewVC