From: Michael Andreen Date: Sun, 11 May 2003 19:42:23 +0000 (+0000) Subject: fixing indent.. X-Git-Url: https://ruin.nu/git/?p=moosique.git;a=commitdiff_plain;h=e4443f04ce1d3b94845a054a1000aa5b8cbcd589 fixing indent.. --- diff --git a/MooTrackView.java b/MooTrackView.java index ccaa105..bf6e31f 100644 --- a/MooTrackView.java +++ b/MooTrackView.java @@ -9,7 +9,7 @@ import javax.sound.midi.*; * @author Andersson , Andreen, Lanneskog, Pehrson * @version 1 */ - + public class MooTrackView extends JPanel implements ActionListener { private Track track; @@ -18,7 +18,7 @@ public class MooTrackView extends JPanel implements ActionListener { private Rectangle box; private JPopupMenu popup; private JMenuItem menuItem; - + public MooTrackView (Track track) { this.track = track; setPreferredSize(new Dimension(200, 200)); @@ -34,19 +34,19 @@ public class MooTrackView extends JPanel implements ActionListener { notes.setBorder(BorderFactory.createLineBorder(Color.black)); popup = new JPopupMenu(); - menuItem = new JMenuItem("Add..."); - menuItem.addActionListener(this); - popup.add(menuItem); - menuItem = new JMenuItem("Preferences..."); - menuItem.addActionListener(this); - popup.add(menuItem); + menuItem = new JMenuItem("Add..."); + menuItem.addActionListener(this); + popup.add(menuItem); + menuItem = new JMenuItem("Preferences..."); + menuItem.addActionListener(this); + popup.add(menuItem); - notes.addMouseListener(new PopupListener()); + notes.addMouseListener(new PopupListener()); add(notes, BorderLayout.CENTER); } - + public void actionPerformed(ActionEvent e) {} - + public Track getTrack() { return track; } @@ -55,7 +55,7 @@ public class MooTrackView extends JPanel implements ActionListener { public void RectanglePanel() { setPreferredSize(new Dimension(20, 20)); } - + public void paintComponent(Graphics g) { super.paintComponent(g); Graphics2D g2 = (Graphics2D)g; @@ -69,20 +69,20 @@ public class MooTrackView extends JPanel implements ActionListener { } } } - + class PopupListener extends MouseAdapter { - public void mousePressed(MouseEvent e) { + public void mousePressed(MouseEvent e) { maybeShowPopup(e); - } - - public void mouseReleased(MouseEvent e) { + } + + public void mouseReleased(MouseEvent e) { maybeShowPopup(e); - } - - private void maybeShowPopup(MouseEvent e) { + } + + private void maybeShowPopup(MouseEvent e) { if (e.isPopupTrigger()) { popup.show(e.getComponent(), e.getX(), e.getY()); } } } -} \ No newline at end of file +}