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);
}
Aggregations