TabbedPaneWheeled.java

1
/*******************************************************************************
2
 * Copyhacked (H) 2012-2020.
3
 * This program and the accompanying materials
4
 * are made available under no term at all, use it like
5
 * you want, but share and discuss about it
6
 * every time possible with every body.
7
 * 
8
 * Contributors:
9
 *      ron190 at ymail dot com - initial implementation
10
 ******************************************************************************/
11
package com.jsql.view.swing.tab;
12
13
import com.jsql.view.swing.action.HotkeyUtil;
14
import com.jsql.view.swing.ui.CustomMetalTabbedPaneUI;
15
16
import javax.swing.*;
17
18
/**
19
 * Tabs with mouse-wheel and right click action.
20
 */
21
public class TabbedPaneWheeled extends JTabbedPane {
22
    
23
    /**
24
     * Create tabs with ctrl-TAB, mouse-wheel and new UI.
25
     */
26
    public TabbedPaneWheeled() {
27
        this(SwingConstants.TOP, JTabbedPane.SCROLL_TAB_LAYOUT);
28
    }
29
30
    public TabbedPaneWheeled(int tabPlacement, int tabLayoutPolicy) {
31
        
32
        super(tabPlacement, tabLayoutPolicy);
33
        
34
        // UIManager.put() is not enough
35 1 1. <init> : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setUI → NO_COVERAGE
        this.setUI(new CustomMetalTabbedPaneUI());
36
        
37 1 1. <init> : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseWheelListener → NO_COVERAGE
        this.addMouseWheelListener(new TabbedPaneMouseWheelListener());
38
        
39
        // Hotkeys ctrl-TAB, ctrl-shift-TAB
40 1 1. <init> : removed call to com/jsql/view/swing/action/HotkeyUtil::addShortcut → NO_COVERAGE
        HotkeyUtil.addShortcut(this);
41
    }
42
43
    /**
44
     * Display popupmenu with a list of tabs.
45
     */
46
    public void addMouseClickMenu() {
47 1 1. addMouseClickMenu : removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseListener → NO_COVERAGE
        this.addMouseListener(new TabMouseAdapter(this));
48
    }
49
}

Mutations

35

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::setUI → NO_COVERAGE

37

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseWheelListener → NO_COVERAGE

40

1.1
Location : <init>
Killed by : none
removed call to com/jsql/view/swing/action/HotkeyUtil::addShortcut → NO_COVERAGE

47

1.1
Location : addMouseClickMenu
Killed by : none
removed call to com/jsql/view/swing/tab/TabbedPaneWheeled::addMouseListener → NO_COVERAGE

Active mutators

Tests examined


Report generated by PIT 1.16.1