Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Working on Swing layout algo
- Loading branch information
Showing
11 changed files
with
119 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,52 @@ | ||
package veb.swing; | ||
|
||
import java.util.Set; | ||
|
||
import space.Float; | ||
import space.Area; | ||
import space.Vector; | ||
import space.Vector.cardinal; | ||
import veb.Drawable; | ||
|
||
public abstract class SwingDecoration implements Drawable<Float> { | ||
protected Vector<Float> assignedOrigin; | ||
protected Vector<Float> assignedExtent; | ||
protected Area assignedGrid; | ||
protected SwingDecoration[] connections; | ||
//protected Area assignedGrid; | ||
|
||
public SwingDecoration(Area setup) { | ||
assignedGrid = setup; | ||
public SwingDecoration() { | ||
//assignedGrid = null; | ||
assignedOrigin = null; | ||
assignedExtent = null; | ||
} | ||
|
||
@Override | ||
abstract public Drawable<Float> merge(Drawable<Float> o); | ||
/** | ||
* @return the assignedOrigin | ||
*/ | ||
public Vector<Float> getAssignedOrigin() { | ||
return assignedOrigin; | ||
} | ||
|
||
/** | ||
* @param assignedOrigin the assignedOrigin to set | ||
*/ | ||
public void setAssignedOrigin(Vector<Float> assignedOrigin) { | ||
this.assignedOrigin = assignedOrigin; | ||
} | ||
|
||
/** | ||
* @return the assignedExtent | ||
*/ | ||
public Vector<Float> getAssignedExtent() { | ||
return assignedExtent; | ||
} | ||
|
||
/** | ||
* @param assignedExtent the assignedExtent to set | ||
*/ | ||
public void setAssignedExtent(Vector<Float> assignedExtent) { | ||
this.assignedExtent = assignedExtent; | ||
} | ||
|
||
abstract public cardinal perimetersTo(SwingDecoration other); | ||
public abstract Set<cardinal> connections(); | ||
|
||
public abstract cardinal perimetersTo(cardinal c, SwingDecoration other); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters