org.jdesktop.swingx.AbstractLayoutManager Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of swingx-all Show documentation
Show all versions of swingx-all Show documentation
A Maven project to aggregate all modules into a single artifact.
package org.jdesktop.swingx;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;
import java.io.Serializable;
/**
* A simple abstract class to handle common layout implementations. Package-private as we do NOT
* want to export this as part of the public API.
*
* @author kschaefer
*/
abstract class AbstractLayoutManager implements LayoutManager, Serializable {
private static final long serialVersionUID = 1446292747820044161L;
/**
* {@inheritDoc}
*
* This implementation does nothing.
*/
@Override
public void addLayoutComponent(String name, Component comp) {
//does nothing
}
/**
* {@inheritDoc}
*
* This implementation does nothing.
*/
@Override
public void removeLayoutComponent(Component comp) {
// does nothing
}
/**
* {@inheritDoc}
*
* This implementation defers to {@link #preferredLayoutSize(Container)}.
*/
@Override
public Dimension minimumLayoutSize(Container parent) {
return preferredLayoutSize(parent);
}
}