@Override
public boolean mouseMove(Component component, int x, int y) {
boolean consumed = super.mouseMove(component, x, y);
if (Mouse.getCapturer() == component) {
SplitPane splitPane = (SplitPane)TerraSplitPaneSkin.this.getComponent();
Orientation orientation = splitPane.getOrientation();
// Calculate the would-be new split location
int splitLocation;
float splitRatio;
if (orientation == Orientation.HORIZONTAL) {
splitLocation = limitSplitLocation(component.getX() + x - dragOffset);
splitRatio = (float)splitLocation / splitPane.getWidth();
} else {
splitLocation = limitSplitLocation(component.getY() + y - dragOffset);
splitRatio = (float)splitLocation / splitPane.getHeight();
}
if (shadow == null) {
// Update the split location immediately
splitPane.setSplitRatio(splitRatio);
} else {
// Move the shadow to the split location
if (orientation == Orientation.HORIZONTAL) {
shadow.setLocation(splitLocation, 0);
} else {