Skip to content

Commit

Permalink
added @OverRide annotations and removed unnecessary or too strong typ…
Browse files Browse the repository at this point in the history
…e casts (#8)
  • Loading branch information
krichter722 authored and sylvestre committed Nov 25, 2016
1 parent 70d3494 commit 60b5c0d
Show file tree
Hide file tree
Showing 176 changed files with 685 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public static class Stub implements DockableFactory {
*
* @return {@code null}.
*/
@Override
public Dockable getDockable(String dockableId) {
return null;
}
Expand All @@ -92,6 +93,7 @@ public Dockable getDockable(String dockableId) {
*
* @return {@code null}.
*/
@Override
public Component getDockableComponent(String dockableId) {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ public class DockingManager implements DockingConstants {
private static class AutoPersist extends Thread {
private boolean enabled;

@Override
public void run() {
store();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ private static void primeImpl() {
PROP_EVENTS.add(ACTIVE_WINDOW);

EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
focusManager.addPropertyChangeListener(SINGLETON);
Expand All @@ -78,6 +79,7 @@ public static ActiveDockableListener getInstance() {
private ActiveDockableListener() {
}

@Override
public void eventDispatched(AWTEvent event) {
//catch all mousePressed events
if(event.getID()!=MouseEvent.MOUSE_PRESSED) {
Expand All @@ -103,6 +105,7 @@ public void eventDispatched(AWTEvent event) {
}
}

@Override
public void propertyChange(PropertyChangeEvent evt) {
String pName = evt.getPropertyName();
if(!PROP_EVENTS.contains(pName)) {
Expand Down Expand Up @@ -155,6 +158,7 @@ private void activateComponent(Component c) {
}


@Override
public void stateChanged(ChangeEvent e) {
Object obj = e.getSource();
if(obj instanceof JTabbedPane) {
Expand Down Expand Up @@ -182,6 +186,7 @@ private void udpateTabChangeFocus(final Dockable dockable) {
// invokeLater because the new tab may not yet be showing, meaning the enumeration of its
// focus-cycle will return empty. the parent dockable in the new tab must be showing.
EventQueue.invokeLater(new Runnable() {
@Override
public void run() {
ActiveDockableTracker.focusDockable(deep, dockable, true);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ PropertyChangeEvent, so requestDockableActivation is called again (cf DockablePr
if (!forceChange) {
final Component c = focuser;
c.addFocusListener(new FocusAdapter() {
@Override
public void focusGained(FocusEvent e) {
if(!DockingUtility.isActive(parentDockable)) {
parentDockable.getDockingProperties().setActive(true);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ public AbstractDockable(String id) {
* instance.
* @see Dockable#getComponent()
*/
@Override
public abstract Component getComponent();

/**
Expand All @@ -98,6 +99,7 @@ public AbstractDockable(String id) {
* @see Dockable#getDragSources()
* @see #getComponent()
*/
@Override
public List getDragSources() {
return dragListeners;
}
Expand All @@ -110,6 +112,7 @@ public List getDragSources() {
* @see Dockable#getPersistentId()
* @see #AbstractDockable(String)
*/
@Override
public String getPersistentId() {
return persistentId;
}
Expand All @@ -126,6 +129,7 @@ public String getPersistentId() {
* external dialog.
* @see Dockable#getFrameDragSources()
*/
@Override
public Set getFrameDragSources() {
if (frameDragSources == null) {
frameDragSources = new HashSet();
Expand Down Expand Up @@ -166,6 +170,7 @@ public String getTabText() {
* the {@code DockingEvent} to respond to.
* @see DockingListener#dockingCanceled(DockingEvent)
*/
@Override
public void dockingCanceled(DockingEvent evt) {
}

Expand All @@ -177,6 +182,7 @@ public void dockingCanceled(DockingEvent evt) {
* the {@code DockingEvent} to respond to.
* @see DockingListener#dockingComplete(DockingEvent)
*/
@Override
public void dockingComplete(DockingEvent evt) {
}

Expand All @@ -188,6 +194,7 @@ public void dockingComplete(DockingEvent evt) {
* the {@code DockingEvent} to respond to.
* @see DockingListener#dragStarted(DockingEvent)
*/
@Override
public void dragStarted(DockingEvent evt) {
}

Expand All @@ -199,6 +206,7 @@ public void dragStarted(DockingEvent evt) {
* the {@code DockingEvent} to respond to.
* @see DockingListener#dropStarted(DockingEvent)
*/
@Override
public void dropStarted(DockingEvent evt) {
}

Expand All @@ -210,6 +218,7 @@ public void dropStarted(DockingEvent evt) {
* the {@code DockingEvent} to respond to.
* @see DockingListener#undockingComplete(DockingEvent)
*/
@Override
public void undockingComplete(DockingEvent evt) {

}
Expand All @@ -222,6 +231,7 @@ public void undockingComplete(DockingEvent evt) {
* the {@code DockingEvent} to respond to.
* @see DockingListener#undockingStarted(DockingEvent)
*/
@Override
public void undockingStarted(DockingEvent evt) {
}

Expand All @@ -234,6 +244,7 @@ public void undockingStarted(DockingEvent evt) {
* @see #getDockingListeners()
* @see #removeDockingListener(DockingListener)
*/
@Override
public void addDockingListener(DockingListener listener) {
if (listener != null) {
dockingListeners.add(listener);
Expand All @@ -250,6 +261,7 @@ public void addDockingListener(DockingListener listener) {
* @see #addDockingListener(DockingListener)
* @see #removeDockingListener(DockingListener)
*/
@Override
public DockingListener[] getDockingListeners() {
return (DockingListener[]) dockingListeners
.toArray(new DockingListener[0]);
Expand All @@ -267,6 +279,7 @@ public DockingListener[] getDockingListeners() {
* @see #addDockingListener(DockingListener)
* @see #getDockingListeners()
*/
@Override
public void removeDockingListener(DockingListener listener) {
if (listener != null) {
dockingListeners.remove(listener);
Expand All @@ -291,6 +304,7 @@ public void removeDockingListener(DockingListener listener) {
* @see Dockable#getClientProperty(Object)
* @see javax.swing.JComponent#getClientProperty(java.lang.Object)
*/
@Override
public Object getClientProperty(Object key) {
if (key == null) {
return null;
Expand Down Expand Up @@ -324,6 +338,7 @@ public Object getClientProperty(Object key) {
* @see javax.swing.JComponent#putClientProperty(java.lang.Object,
* java.lang.Object)
*/
@Override
public void putClientProperty(Object key, Object value) {
if (key == null) {
return;
Expand Down Expand Up @@ -352,6 +367,7 @@ public void putClientProperty(Object key, Object value) {
* @see Dockable#getDockingProperties()
* @see org.flexdock.docking.props.PropertyManager#getDockablePropertySet(Dockable)
*/
@Override
public DockablePropertySet getDockingProperties() {
return PropertyManager.getDockablePropertySet(this);
}
Expand All @@ -372,6 +388,7 @@ public DockablePropertySet getDockingProperties() {
* @see Dockable#getDockingPort()
* @see DockingManager#getDockingPort(Dockable)
*/
@Override
public DockingPort getDockingPort() {
return DockingManager.getDockingPort(this);
}
Expand All @@ -389,6 +406,7 @@ public DockingPort getDockingPort() {
* @see Dockable#dock(Dockable)
* @see DockingManager#dock(Dockable, Dockable)
*/
@Override
public boolean dock(Dockable dockable) {
return DockingManager.dock(dockable, this);
}
Expand All @@ -410,6 +428,7 @@ public boolean dock(Dockable dockable) {
* @see Dockable#dock(Dockable, String)
* @see DockingManager#dock(Dockable, Dockable, String)
*/
@Override
public boolean dock(Dockable dockable, String relativeRegion) {
return DockingManager.dock(dockable, this, relativeRegion);
}
Expand All @@ -433,14 +452,17 @@ public boolean dock(Dockable dockable, String relativeRegion) {
* {@code false} otherwise.
* @see DockingManager#dock(Dockable, Dockable, String, float)
*/
@Override
public boolean dock(Dockable dockable, String relativeRegion, float ratio) {
return DockingManager.dock(dockable, this, relativeRegion, ratio);
}

@Override
public void addPropertyChangeListener(PropertyChangeListener listener) {
getDockingProperties().addPropertyChangeListener(listener);
}

@Override
public void removePropertyChangeListener(PropertyChangeListener listener) {
getDockingProperties().removePropertyChangeListener(listener);
}
Expand Down
Loading

0 comments on commit 60b5c0d

Please sign in to comment.