Search in sources :

Example 16 with JLayeredPane

use of javax.swing.JLayeredPane in project logisim-evolution by reds-heig.

the class RightPanel method createPanel.

/**
 * Creates and add all component: -timeline -all signalDraw -cursor
 */
private void createPanel() {
    rightBox = Box.createVerticalBox();
    rightBox.setOpaque(true);
    // Add the time line
    mTimeLine = new TimelineDraw(mChronoFrame, mCommonPanelParam.getHeaderHeight(), tickWidth);
    // creates the SignalDraw
    for (String signalName : mChronoFrame.getChronoData().getSignalOrder()) {
        if (!signalName.equals("sysclk"))
            allSignalDraw.add(new SignalDraw(this, mDrawAreaEventManager, mChronoFrame.getChronoData().get(signalName), mCommonPanelParam.getSignalHeight()));
    }
    // add the signals to the box
    for (SignalDraw sDraw : allSignalDraw) {
        rightBox.add(sDraw);
    }
    // add the cursor
    mCursor = new Cursor();
    // creates a JLayeredPane, to put the Cursor in front of the SignalDraw
    // and the timeline
    layeredPane = new JLayeredPane();
    defineSizes();
    layeredPane.add(mCursor, new Integer(1));
    layeredPane.add(mTimeLine, new Integer(0));
    layeredPane.add(rightBox, new Integer(0));
    this.add(layeredPane, BorderLayout.WEST);
}
Also used : JLayeredPane(javax.swing.JLayeredPane)

Aggregations

JLayeredPane (javax.swing.JLayeredPane)16 Component (java.awt.Component)6 JButton (javax.swing.JButton)6 JComponent (javax.swing.JComponent)5 Dimension (java.awt.Dimension)4 JPanel (javax.swing.JPanel)4 JEditorPane (javax.swing.JEditorPane)3 JMenuBar (javax.swing.JMenuBar)3 JRootPane (javax.swing.JRootPane)3 Dialog (java.awt.Dialog)2 Frame (java.awt.Frame)2 Insets (java.awt.Insets)2 ArrayList (java.util.ArrayList)2 JCheckBox (javax.swing.JCheckBox)2 JCheckBoxMenuItem (javax.swing.JCheckBoxMenuItem)2 JColorChooser (javax.swing.JColorChooser)2 JDesktopPane (javax.swing.JDesktopPane)2 JDialog (javax.swing.JDialog)2 JFrame (javax.swing.JFrame)2 JLabel (javax.swing.JLabel)2