@Override
public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count) {
boolean consumed = super.mouseClick(component, button, x, y, count);
TabButton tabButton = (TabButton)getComponent();
TabPane tabPane = (TabPane)TerraTabPaneSkin.this.getComponent();
if (tabPane.isCloseable()
&& tabButton.isSelected()
&& getCloseTriggerBounds().contains(x, y)) {
tabPane.getTabs().remove(tabButton.tab);
} else {
tabButton.press();
}
return consumed;