Package viewer.zoomable

Examples of viewer.zoomable.ViewportTimePanel


                /* The Time Ruler */
                time_ruler        = new RulerTime( time_model );
                time_ruler_vport  = new ViewportTime( time_model );
                time_ruler_vport.setView( time_ruler );
                time_ruler_panel  = new ViewportTimePanel( time_ruler_vport );
                if ( Parameters.HISTOGRAM_ZERO_ORIGIN )
                    time_ruler_panel.setBorderTitle( " Duration (seconds) ",
                                                     TitledBorder.RIGHT,
                                                     TitledBorder.BOTTOM,
                                                     Const.FONT, Color.red );
                else
                    time_ruler_panel.setBorderTitle( " Time (seconds) ",
                                                     TitledBorder.RIGHT,
                                                     TitledBorder.BOTTOM,
                                                     Const.FONT, Color.red );
                time_ruler_vport.initLeftMouseToZoom( false );
                /*
                   Propagation of AdjustmentEvent originating from scroller:

                   scroller -----> time_model -----> viewport -----> view
                             adj               time           paint
                   viewport is between time_model and view because
                   viewport is what user sees.
                */
                time_model.addTimeListener( time_ruler_vport );
                /*
                   Since there is NOT a specific ViewportTime/ViewTimePanel
                   for RulerTime, so we need to set PreferredSize of RulerTime
                   here.  Since CanvasTime's has its MaximumSize set to MAX,
                   CanvasTime's ViewportTimePanel will become space hungary.
                   As we want RulerTime to be fixed height during resize
                   of the top level window, So it becomes CRUCIAL to set
                   Preferred Height of RulerTime's ViewportTimePanel equal
                   to its Minimum Height and Maximum Height.
                */
                Insets   ruler_panel_insets = time_ruler_panel.getInsets();
                int      ruler_panel_height = ruler_panel_insets.top
                                            + time_ruler.getJComponentHeight()
                                            + ruler_panel_insets.bottom;
                time_ruler_panel.setPreferredSize(
                     new Dimension( 100, ruler_panel_height ) );

                /* The StatLine Canvas */
                stat_canvas       = new CanvasStatline( time_model,
                                                        buf4statboxes,
                                                        y_model, y_maps,
                                                        y_colnames );
                stat_canvas_vport = new ViewportTimeYaxis( time_model,
                                                           y_model, y_tree );
                stat_canvas_vport.setView( stat_canvas );
                stat_canvas_panel = new ViewportTimePanel( stat_canvas_vport );
                stat_canvas_panel.setBorderTitle( " Statistics ",
                                                  TitledBorder.RIGHT,
                                                  TitledBorder.TOP,
                                                  null, Color.blue );
                stat_canvas_vport.initLeftMouseToZoom( true );
View Full Code Here


                /* The Time Ruler */
                time_ruler        = new RulerTime( time_model );
                time_ruler_vport  = new ViewportTime( time_model );
                time_ruler_vport.setView( time_ruler );
                time_ruler_panel  = new ViewportTimePanel( time_ruler_vport );
                time_ruler_panel.setBorderTitle( " Time (seconds) ",
                                                 TitledBorder.RIGHT,
                                                 TitledBorder.BOTTOM,
                                                 Const.FONT, Color.red );
                time_ruler_vport.initLeftMouseToZoom( false );
                /*
                   Propagation of AdjustmentEvent originating from scroller:

                   scroller -----> time_model -----> viewport -----> view
                             adj               time           paint
                   viewport is between time_model and view because
                   viewport is what user sees. 
                */
                time_model.addTimeListener( time_ruler_vport );
                /*
                   Since there is NOT a specific ViewportTime/ViewTimePanel
                   for RulerTime, so we need to set PreferredSize of RulerTime
                   here.  Since CanvasTimeline's has its MaximumSize set to MAX,
                   CanvasTimeline's ViewportTimePanel will become space hungary.
                   As we want RulerTime to be fixed height during resize
                   of the top level window, So it becomes CRUCIAL to set
                   Preferred Height of RulerTime's ViewportTimePanel equal
                   to its Minimum Height and Maximum Height.
                */
                Insets   ruler_panel_insets = time_ruler_panel.getInsets();
                int      ruler_panel_height = ruler_panel_insets.top
                                            + time_ruler.getJComponentHeight()
                                            + ruler_panel_insets.bottom;
                time_ruler_panel.setPreferredSize(
                     new Dimension( 100, ruler_panel_height ) );

                /* The TimeLine Canvas */
                time_canvas       = new CanvasTimeline( time_model, treetrunk,
                                                        y_model, y_maps,
                                                        y_colnames, methods );
                time_canvas_vport = new ViewportTimeYaxis( time_model,
                                                           y_model, y_tree );
                time_canvas_vport.setView( time_canvas );
                time_canvas_panel = new ViewportTimePanel( time_canvas_vport );
                time_canvas_panel.setBorderTitle( " TimeLines ",
                                                  TitledBorder.RIGHT,
                                                  TitledBorder.TOP,
                                                  null, Color.blue );
                time_canvas_vport.initLeftMouseToZoom( true );
View Full Code Here

TOP

Related Classes of viewer.zoomable.ViewportTimePanel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.