⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 timelinetoolbar.java

📁 fortran并行计算包
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
            backward_btn = new JButton( new ImageIcon( icon_URL ) );        else            backward_btn = new JButton( "Backward" );        backward_btn.setMargin( btn_insets );        backward_btn.setToolTipText( "Scroll Backward by half a screen" );        backward_btn.setMnemonic( KeyEvent.VK_LEFT );        // backward_btn.setPreferredSize( btn_dim );        backward_btn.addActionListener(                     new ActionVportBackward( time_scrollbar ) );        super.add( backward_btn );        icon_URL = getURL( Const.IMG_PATH + "Forward24.gif" );        if ( icon_URL != null )            forward_btn = new JButton( new ImageIcon( icon_URL ) );        else            forward_btn = new JButton( "Forward" );        forward_btn.setMargin( btn_insets );        forward_btn.setToolTipText( "Scroll Forward by half a screen" );        forward_btn.setMnemonic( KeyEvent.VK_RIGHT );        // forward_btn.setPreferredSize( btn_dim );        forward_btn.addActionListener(                    new ActionVportForward( time_scrollbar ) );        super.add( forward_btn );        super.addSeparator( mini_separator_size );        // icon_URL = getURL( Const.IMG_PATH + "Undo24.gif" );        icon_URL = getURL( Const.IMG_PATH + "WinUndo.gif" );        if ( icon_URL != null )            zoomUndo_btn = new JButton( new ImageIcon( icon_URL ) );        else            zoomUndo_btn = new JButton( "ZoomUndo" );        zoomUndo_btn.setMargin( btn_insets );        zoomUndo_btn.setToolTipText( "Undo the previous zoom operation" );        zoomUndo_btn.setMnemonic( KeyEvent.VK_U );        // zoomUndo_btn.setPreferredSize( btn_dim );        zoomUndo_btn.addActionListener(                     new ActionZoomUndo( this, time_model ) );        super.add( zoomUndo_btn );        super.addSeparator( mini_separator_size );        icon_URL = getURL( Const.IMG_PATH + "ZoomOut24.gif" );        if ( icon_URL != null )            zoomOut_btn = new JButton( new ImageIcon( icon_URL ) );        else            zoomOut_btn = new JButton( "ZoomOut" );        zoomOut_btn.setMargin( btn_insets );        zoomOut_btn.setToolTipText( "Zoom Out by 1 level in time" );        zoomOut_btn.setMnemonic( KeyEvent.VK_O );        // zoomOut_btn.setPreferredSize( btn_dim );        zoomOut_btn.addActionListener(                    new ActionZoomOut( this, time_model ) );        super.add( zoomOut_btn );        icon_URL = getURL( Const.IMG_PATH + "Home24.gif" );        if ( icon_URL != null )            zoomHome_btn = new JButton( new ImageIcon( icon_URL ) );        else            zoomHome_btn = new JButton( "ZoomHome" );        zoomHome_btn.setMargin( btn_insets );        zoomHome_btn.setToolTipText(                     "Reset zoom to the initial resolution in time" );        zoomHome_btn.setMnemonic( KeyEvent.VK_H );        // zoomHome_btn.setPreferredSize( btn_dim );        zoomHome_btn.addActionListener(                 new ActionZoomHome( this, time_model ) );        super.add( zoomHome_btn );        icon_URL = getURL( Const.IMG_PATH + "ZoomIn24.gif" );        if ( icon_URL != null )            zoomIn_btn = new JButton( new ImageIcon( icon_URL ) );        else            zoomIn_btn = new JButton( "ZoomIn" );        zoomIn_btn.setMargin( btn_insets );        zoomIn_btn.setToolTipText( "Zoom In iby 1 level in time" );        zoomIn_btn.setMnemonic( KeyEvent.VK_I );        // zoomIn_btn.setPreferredSize( btn_dim );        zoomIn_btn.addActionListener(                   new ActionZoomIn( this, time_model ) );        super.add( zoomIn_btn );        super.addSeparator( mini_separator_size );        // icon_URL = getURL( Const.IMG_PATH + "Redo24.gif" );        icon_URL = getURL( Const.IMG_PATH + "WinRedo.gif" );        if ( icon_URL != null )            zoomRedo_btn = new JButton( new ImageIcon( icon_URL ) );        else            zoomRedo_btn = new JButton( "ZoomRedo" );        zoomRedo_btn.setMargin( btn_insets );        zoomRedo_btn.setToolTipText( "Redo the previous zoom operation" );        zoomRedo_btn.setMnemonic( KeyEvent.VK_R );        // zoomRedo_btn.setPreferredSize( btn_dim );        zoomRedo_btn.addActionListener(                     new ActionZoomRedo( this, time_model ) );        super.add( zoomRedo_btn );        super.addSeparator( mini_separator_size );        /*        icon_URL = getURL( Const.IMG_PATH + "ZoomSet24.gif" );        if ( icon_URL != null )            zoomSet_btn = new JButton( new ImageIcon( icon_URL ) );        else            zoomSet_btn = new JButton( "ZoomSet" );        zoomSet_btn.setMargin( btn_insets );        zoomSet_btn.setToolTipText( "Set zoom paramter by a panel" );        // zoomHome_btn.setPreferredSize( btn_dim );        // zoomSet_btn.addActionListener(        //         new ActionZoomSet( this, time_model ) );        super.add( zoomSet_btn );        */        super.addSeparator();        super.addSeparator();        icon_URL = getURL( Const.IMG_PATH + "FindBack24.gif" );        if ( icon_URL != null )            searchBack_btn = new JButton( new ImageIcon( icon_URL ) );        else            searchBack_btn = new JButton( "SearchBackward" );        searchBack_btn.setMargin( btn_insets );        searchBack_btn.setToolTipText( "Search Backward in time" );        searchBack_btn.setMnemonic( KeyEvent.VK_B );        // searchBack_btn.setPreferredSize( btn_dim );        searchBack_btn.addActionListener(                        new ActionSearchBackward( this, canvas_vport ) );        super.add( searchBack_btn );        icon_URL = getURL( Const.IMG_PATH + "Find24.gif" );        if ( icon_URL != null )            searchInit_btn = new JButton( new ImageIcon( icon_URL ) );        else            searchInit_btn = new JButton( "SearchInitialize" );        searchInit_btn.setMargin( btn_insets );        searchInit_btn.setToolTipText(                      "Search Initialization from last popup InfoBox's time" );        searchInit_btn.setMnemonic( KeyEvent.VK_S );        // searchInit_btn.setPreferredSize( btn_dim );        searchInit_btn.addActionListener(                       new ActionSearchInit( this, canvas_vport ) );        super.add( searchInit_btn );        icon_URL = getURL( Const.IMG_PATH + "FindFore24.gif" );        if ( icon_URL != null )            searchFore_btn = new JButton( new ImageIcon( icon_URL ) );        else            searchFore_btn = new JButton( "SearchForward" );        searchFore_btn.setMargin( btn_insets );        searchFore_btn.setToolTipText( "Search Forward in time" );        searchFore_btn.setMnemonic( KeyEvent.VK_F );        // searchFore_btn.setPreferredSize( btn_dim );        searchFore_btn.addActionListener(                       new ActionSearchForward( this, canvas_vport ) );        super.add( searchFore_btn );        super.addSeparator();        super.addSeparator();        icon_URL = getURL( Const.IMG_PATH + "Refresh24.gif" );        if ( icon_URL != null )            refresh_btn = new JButton( new ImageIcon( icon_URL ) );        else            refresh_btn = new JButton( "CanvasReDraw" );        refresh_btn.setMargin( btn_insets );        refresh_btn.setToolTipText(                     "Redraw canvas to synchronize changes from "                   + "Preference/Legend window or Yaxis label panel" );        refresh_btn.setMnemonic( KeyEvent.VK_D );        // refresh_btn.setPreferredSize( btn_dim );        refresh_btn.addActionListener(                   new ActionPptyRefresh( y_tree, commit_btn ) );        super.add( refresh_btn );        icon_URL = getURL( Const.IMG_PATH + "Print24.gif" );        if ( icon_URL != null )            print_btn = new JButton( new ImageIcon( icon_URL ) );        else            print_btn = new JButton( "Print" );        print_btn.setMargin( btn_insets );        print_btn.setToolTipText( "Print the Timeline window" );        // print_btn.setPreferredSize( btn_dim );        print_btn.addActionListener( new ActionPptyPrint() );        super.add( print_btn );        icon_URL = getURL( Const.IMG_PATH + "Stop24.gif" );        if ( icon_URL != null )            stop_btn = new JButton( new ImageIcon( icon_URL ) );        else            stop_btn = new JButton( "Exit" );        stop_btn.setMargin( btn_insets );        stop_btn.setToolTipText( "Exit the Timeline window" );        // stop_btn.setPreferredSize( btn_dim );        stop_btn.addActionListener( new ActionPptyStop( root_window ) );        super.add( stop_btn );    }    private void initAllButtons()    {        up_btn.setEnabled( true );        down_btn.setEnabled( true );        mark_btn.setEnabled( true );        move_btn.setEnabled( false );        delete_btn.setEnabled( false );        // remove_btn.setEnabled( true );        this.resetYaxisTreeButtons();        backward_btn.setEnabled( true );        forward_btn.setEnabled( true );        this.resetZoomButtons();        searchBack_btn.setEnabled( true );        searchInit_btn.setEnabled( true );        searchFore_btn.setEnabled( true );        refresh_btn.setEnabled( true );        print_btn.setEnabled( false );        stop_btn.setEnabled( true );    }    //  Interface for ToolBarStatus    public void resetZoomButtons()    {        int zoomlevel = time_model.getZoomLevel();        zoomIn_btn.setEnabled( zoomlevel < Const.MAX_ZOOM_LEVEL );        zoomHome_btn.setEnabled( zoomlevel != Const.MIN_ZOOM_LEVEL );        zoomOut_btn.setEnabled( zoomlevel > Const.MIN_ZOOM_LEVEL );        zoomUndo_btn.setEnabled( ! time_model.isZoomUndoStackEmpty() );        zoomRedo_btn.setEnabled( ! time_model.isZoomRedoStackEmpty() );    }    //  Interface for ToolBarStatus    public void resetYaxisTreeButtons()    {        expand_btn.setEnabled( y_tree.isLevelExpandable() );        collapse_btn.setEnabled( y_tree.isLevelCollapsable() );        commit_btn.setEnabled( true );    }    //  Interface for ToolBarStatus    public JButton getYaxisTreeCommitButton()    { return commit_btn; }    //  Interface for ToolBarStatus    public JButton getPropertyRefreshButton()    { return refresh_btn; }    //  Interface for ToolBarStatus    public JButton getTimelineMarkButton()    { return mark_btn; }    //  Interface for ToolBarStatus    public JButton getTimelineMoveButton()    { return move_btn; }    //  Interface for ToolBarStatus    public JButton getTimelineDeleteButton()    { return delete_btn; }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -