Skip to content

Commit

Permalink
add missing @OVERRIDES without whitespace diffs
Browse files Browse the repository at this point in the history
Signed-off-by: Mike Barry <[email protected]>
  • Loading branch information
msbarry committed Nov 8, 2023
1 parent cb9455e commit ac1970b
Show file tree
Hide file tree
Showing 64 changed files with 208 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public class OverlayNoSnapFunctions {
public static Geometry unaryUnion(Geometry a) {
UnionStrategy unionSRFun = new UnionStrategy() {

@Override
public Geometry union(Geometry g0, Geometry g1) {
return OverlayOp.overlayOp(g0, g1, OverlayOp.UNION );
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,8 @@ public StaticMethodGeometryFunction(
isRequiredB = extractRequiredB(method);
}

public Object invoke(Geometry g, Object[] arg)
@Override
public Object invoke(Geometry g, Object[] arg)
{
return invoke(method, null, createFullArgs(g, arg));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ public GeometryEditPanel() {
void initUI() throws Exception {
this.addComponentListener(new java.awt.event.ComponentAdapter() {

@Override
public void componentResized(ComponentEvent e) {
this_componentResized(e);
}
Expand All @@ -132,11 +133,13 @@ public void componentResized(ComponentEvent e) {

class PopupClickListener extends MouseAdapter
{
@Override
public void mousePressed(MouseEvent e)
{
if (e.isPopupTrigger())
doPopUp(e);
}
@Override
public void mouseReleased(MouseEvent e)
{
if (e.isPopupTrigger())
Expand Down Expand Up @@ -242,6 +245,7 @@ public void updateGeom()
getGeomModel().geomChanged();
}

@Override
public String getToolTipText(MouseEvent event) {
// if (event.getPoint().x < 100) return null;
Coordinate pt = viewport.toModelCoordinate(event.getPoint());
Expand All @@ -266,6 +270,7 @@ public String getInfo(Coordinate pt)
return writer.writeLocationString(getLayerList(), pt, toleranceInModel);
}

@Override
public void paintComponent(Graphics g) {
super.paintComponent(g);
renderMgr.render();
Expand Down Expand Up @@ -596,6 +601,7 @@ public GeometryEditPanelRenderer()
}
}

@Override
public void render(Graphics2D g2)
{
g2.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
Expand Down Expand Up @@ -795,6 +801,7 @@ public void renderRevealTopoWarning(Graphics2D g)

}

@Override
public synchronized void cancel()
{
if (currentRenderer != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class GeometryFunctionListPanel extends JPanel {
JScrollPane jScrollPane1 = new JScrollPane();

JList list = new JList(listModel){
@Override
public String getToolTipText(MouseEvent e) {
int index = locationToIndex(e.getPoint());
if (-1 < index) {
Expand All @@ -69,6 +70,7 @@ private class GeometryFunctionCellRenderer extends JLabel implements
private final ImageIcon unaryIcon = new ImageIcon(this.getClass()
.getResource("UnaryGeomFunction.png"));

@Override
public Component getListCellRendererComponent(JList list, Object value,
int index, boolean isSelected, boolean cellHasFocus) {
GeometryFunction func = (GeometryFunction) value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ private class GeometryFunctionRenderer extends DefaultTreeCellRenderer {
public GeometryFunctionRenderer() {
}

@Override
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {

Expand Down Expand Up @@ -127,6 +128,7 @@ private void jbInit() throws Exception {
TreeSelectionModel.SINGLE_TREE_SELECTION);

tree.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (e.getClickCount() == 2) {
GeometryFunction fun = getFunction();
Expand All @@ -137,6 +139,7 @@ public void mouseClicked(MouseEvent e) {
}
});
tree.addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(TreeSelectionEvent e) {
GeometryFunction fun = getFunction();
if (fun != null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ private class GeometryTreeCellRenderer extends DefaultTreeCellRenderer {
public GeometryTreeCellRenderer() {
}

@Override
public Component getTreeCellRendererComponent(JTree tree, Object value,
boolean sel, boolean expanded, boolean leaf, int row, boolean hasFocus) {

Expand Down Expand Up @@ -94,6 +95,7 @@ private void initUI() throws Exception {


tree.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
Geometry geom = getSelectedGeometry();
if (geom == null) return;
Expand All @@ -108,6 +110,7 @@ public void mouseClicked(MouseEvent e) {
}
});
tree.addTreeSelectionListener(new TreeSelectionListener() {
@Override
public void valueChanged(TreeSelectionEvent e) {
//GeometryFunction fun = getFunction();
//if (fun != null)
Expand Down Expand Up @@ -168,13 +171,15 @@ public void populate(Geometry geom, int source, Comparator comp) {
}

//Required by TreeWillExpandListener interface.
public void treeWillExpand(TreeExpansionEvent e)
@Override
public void treeWillExpand(TreeExpansionEvent e)
throws ExpandVetoException {
TreePath path = e.getPath();
Object lastComp = path.getLastPathComponent();
}

//Required by TreeWillExpandListener interface.
@Override
public void treeWillCollapse(TreeExpansionEvent e) {
// take no action
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ private void uiInit() throws Exception {
btnCopy = SwingUtil.createButton(AppIcons.ADD,
"Copy layer to a new layer",
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layerCopy();
}
Expand All @@ -106,6 +107,7 @@ public void actionPerformed(ActionEvent e) {
btnInspect = SwingUtil.createButton(AppIcons.GEOM_INSPECT,
"Inspect layer geometry",
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layerInspect();
}
Expand All @@ -115,6 +117,7 @@ public void actionPerformed(ActionEvent e) {
btnPaste = SwingUtil.createButton(AppIcons.PASTE,
"Paste geometry into layer",
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layerPaste(focusLayer);
}
Expand All @@ -123,6 +126,7 @@ public void actionPerformed(ActionEvent e) {
btnUp = SwingUtil.createButton(AppIcons.UP,
"Move layer up",
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layerUp(focusLayer);
}
Expand All @@ -131,6 +135,7 @@ public void actionPerformed(ActionEvent e) {
btnDown = SwingUtil.createButton(AppIcons.DOWN,
"Move layer down",
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layerDown(focusLayer);
}
Expand All @@ -140,6 +145,7 @@ public void actionPerformed(ActionEvent e) {
btnDelete = SwingUtil.createButton(AppIcons.DELETE,
AppStrings.TIP_LAYER_CLEAR,
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
if (SwingUtil.isCtlKeyPressed(e)) {
layerDelete(focusLayer);
Expand Down Expand Up @@ -315,6 +321,7 @@ class LayerItemPanel extends JPanel {
self = this;
}

@Override
public String getToolTipText(MouseEvent e) {
return layer.getNameInfo();
}
Expand Down Expand Up @@ -352,6 +359,7 @@ private void uiInit() throws Exception {
add(checkbox);
checkbox.setAlignmentX(Component.LEFT_ALIGNMENT);
checkbox.addActionListener(new java.awt.event.ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
layerVisAction();
}
Expand All @@ -369,7 +377,8 @@ public void actionPerformed(ActionEvent e) {
lblName.addMouseListener(new HighlightMouseListener(this));
lblName.addMouseListener(new MouseAdapter()
{
public void mouseClicked(MouseEvent e)
@Override
public void mouseClicked(MouseEvent e)
{
lyrListPanel.setLayerFocus(self);
}
Expand Down Expand Up @@ -408,13 +417,15 @@ class HighlightMouseListener extends MouseAdapter {
this.comp = comp;
}

@Override
public void mouseEntered(MouseEvent e) {
if (comp.isFocusLayer()) return;
comp.setBackground(CLR_HIGHLIGHT);
//comp.setBorder(BORDER_HIGHLIGHT);
comp.revalidate();
}

@Override
public void mouseExited(MouseEvent e) {
if (comp.isFocusLayer()) return;
comp.setBackground(AppColors.BACKGROUND);
Expand All @@ -434,6 +445,7 @@ public LayerName(Layer layer) {
setToolTipText(layer.getName());
}

@Override
public String getToolTipText(MouseEvent e) {
return layer.getNameSummary();
}
Expand All @@ -459,6 +471,7 @@ public LayerStyleSwatchControl(Layer layer) {
setToolTipText(layer.getName());
}

@Override
public String getToolTipText(MouseEvent e) {
return layer.getNameSummary();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ public BoxDeleteComponentOperation(Envelope env, boolean deleteIntersecting)

public boolean isEdited() { return isEdited; }

@Override
public Geometry edit(Geometry geometry, GeometryFactory factory)
{
// Allow any number of components to be deleted
Expand Down Expand Up @@ -145,6 +146,7 @@ public BoxDeleteVertexOperation(Envelope env)

public boolean isEdited() { return isEdited; }

@Override
public Coordinate[] edit(Coordinate[] coords,
Geometry geometry)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public DeleteVertexOperation(LineString line, int vertexIndex)
this.vertexIndex = vertexIndex;
}

@Override
public Coordinate[] edit(Coordinate[] coords,
Geometry geometry)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public InsertVertexOperation(LineString line, int segIndex, Coordinate newVertex
this.newVertex = newVertex;
}

@Override
public Coordinate[] edit(Coordinate[] coords,
Geometry geometry)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ public MoveVertexOperation(Coordinate fromLoc, Coordinate toLoc)
this.toLoc = toLoc;
}

@Override
public Coordinate[] edit(Coordinate[] coords,
Geometry geometry)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ public MultiLineHandler(int type) throws InvalidShapefileException
}


@Override
public Geometry read( EndianDataInputStream file , GeometryFactory geometryFactory, int contentLength) throws IOException,InvalidShapefileException
{

Expand Down Expand Up @@ -186,10 +187,12 @@ public Geometry read( EndianDataInputStream file , GeometryFactory geometryFacto
/**
* Get the type of shape stored (Shapefile.ARC)
*/
@Override
public int getShapeType(){
return myShapeType;
}

@Override
public int getLength(Geometry geometry){
MultiLineString multi = (MultiLineString) geometry;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ public MultiPointHandler(int type) throws InvalidShapefileException
myShapeType = type;
}

@Override
public Geometry read(EndianDataInputStream file,GeometryFactory geometryFactory,int contentLength) throws IOException,InvalidShapefileException{
//file.setLittleEndianMode(true);

Expand Down Expand Up @@ -186,6 +187,7 @@ public Geometry read(EndianDataInputStream file,GeometryFactory geometryFactory,
* Returns the shapefile shape type value for a point
* @return int Shapefile.POINT
*/
@Override
public int getShapeType(){
return myShapeType;
}
Expand All @@ -194,6 +196,7 @@ public int getShapeType(){
* Calcuates the record length of this object.
* @return int The length of the record that this shapepoint will take up in a shapefile
**/
@Override
public int getLength(Geometry geometry){
MultiPoint mp = (MultiPoint) geometry;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ public PointHandler()
myShapeType = 1; //2d
}

@Override
public Geometry read(EndianDataInputStream file,GeometryFactory geometryFactory,int contentLength) throws IOException,InvalidShapefileException
{
// file.setLittleEndianMode(true);
Expand Down Expand Up @@ -88,14 +89,16 @@ public Geometry read(EndianDataInputStream file,GeometryFactory geometryFactory,
* Returns the shapefile shape type value for a point
* @return int Shapefile.POINT
*/
public int getShapeType(){
@Override
public int getShapeType(){
return myShapeType;
}

/**
* Calcuates the record length of this object.
* @return int The length of the record that this shapepoint will take up in a shapefile
**/
@Override
public int getLength(Geometry geometry){
if (myShapeType == Shapefile.POINT)
return 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ boolean pointInList(Coordinate testPoint, Coordinate[] pointList)
return false;
}

@Override
public Geometry read( EndianDataInputStream file , GeometryFactory geometryFactory, int contentLength)
throws IOException, InvalidShapefileException
{
Expand Down Expand Up @@ -297,9 +298,11 @@ private static int findIndex(ArrayList list, Object o)
}


@Override
public int getShapeType(){
return myShapeType;
}
@Override
public int getLength(Geometry geometry){

int nrings=0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public MoveVerticesOperation(Map moves)
}


@Override
public Coordinate[] edit(Coordinate[] coords,
Geometry geometry)
{
Expand Down
Loading

0 comments on commit ac1970b

Please sign in to comment.