mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-27 23:18:02 -04:00
fixed some javaDoc checkstyle isues
This commit is contained in:
parent
8464e72cf7
commit
311ea20f32
@ -412,7 +412,7 @@ public class TruthTable {
|
||||
/**
|
||||
* Removes the given result column
|
||||
*
|
||||
* @param i
|
||||
* @param i the index of the result to remove
|
||||
*/
|
||||
public void removeResult(int i) {
|
||||
results.remove(i);
|
||||
|
@ -25,10 +25,11 @@ public class ATF1502CuplExporter extends CuplExporter {
|
||||
* Creates a new project name
|
||||
*
|
||||
* @param username user name
|
||||
* @param devName the type of the device
|
||||
* @param date date
|
||||
*/
|
||||
public ATF1502CuplExporter(String username, Date date, String type) {
|
||||
super(username, date, type, new PinMap()
|
||||
public ATF1502CuplExporter(String username, Date date, String devName) {
|
||||
super(username, date, devName, new PinMap()
|
||||
.setAvailBidirectional(4, 5, 6, 8, 9, 11, 12, 14, 16, 17,
|
||||
18, 19, 20, 21, 24, 25, 26, 27, 28,
|
||||
29, 31, 33, 34, 36, 37, 38, 39, 40));
|
||||
|
@ -12,7 +12,7 @@ public class ATF1502TT2Exporter extends TT2Exporter {
|
||||
/**
|
||||
* Creates a new project name
|
||||
*
|
||||
* @param projectName user name
|
||||
* @param projectName project name
|
||||
*/
|
||||
public ATF1502TT2Exporter(String projectName) {
|
||||
super(projectName);
|
||||
|
@ -9,6 +9,8 @@ public class ATF1504TT2Exporter extends ATF1502TT2Exporter {
|
||||
|
||||
/**
|
||||
* Creates a new project name
|
||||
*
|
||||
* @param projectName project name
|
||||
*/
|
||||
public ATF1504TT2Exporter(String projectName) {
|
||||
super(projectName);
|
||||
|
@ -31,6 +31,8 @@ public class TT2Exporter implements ExpressionExporter<TT2Exporter> {
|
||||
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param projectName project name
|
||||
*/
|
||||
public TT2Exporter(String projectName) {
|
||||
builder = new BuilderCollector() {
|
||||
|
@ -307,6 +307,7 @@ public class Model implements Iterable<Node> {
|
||||
* Returns the first observer of the given class.
|
||||
*
|
||||
* @param observerClass the observer class
|
||||
* @param <T> the type of the observer
|
||||
* @return the found observer or null if not present
|
||||
*/
|
||||
public <T extends ModelStateObserver> T getObserver(Class<T> observerClass) {
|
||||
|
@ -20,6 +20,7 @@ public class NodeException extends Exception {
|
||||
* Creates a new instance.
|
||||
*
|
||||
* @param message the message
|
||||
* @param values the values affected by this exception
|
||||
*/
|
||||
public NodeException(String message, ObservableValue... values) {
|
||||
this(message, null, new ObservableValues(values));
|
||||
@ -86,13 +87,13 @@ public class NodeException extends Exception {
|
||||
}
|
||||
}
|
||||
|
||||
if (nodes != null && nodes.size()>0) {
|
||||
if (nodes != null && nodes.size() > 0) {
|
||||
HashSet<File> origins = new HashSet<>();
|
||||
for (Node node : nodes) {
|
||||
if (node!=null && node.getOrigin()!=null && node.getOrigin().length()>0)
|
||||
if (node != null && node.getOrigin() != null && node.getOrigin().length() > 0)
|
||||
origins.add(node.getOrigin());
|
||||
}
|
||||
if (origins.size()>0) {
|
||||
if (origins.size() > 0) {
|
||||
sb.append(" in ");
|
||||
sb.append(origins.toString());
|
||||
}
|
||||
|
@ -93,6 +93,8 @@ public class ObservableValues extends ImmutableList<ObservableValue> {
|
||||
* Creates a new Instance
|
||||
*
|
||||
* @param items the items to store
|
||||
* @param from from index
|
||||
* @param to to index, exclusive
|
||||
*/
|
||||
public ObservableValues(ObservableValues items, int from, int to) {
|
||||
super(items, from, to);
|
||||
|
@ -41,6 +41,8 @@ public interface Element {
|
||||
|
||||
/**
|
||||
* Is called after registerNodes is called on all Elements.
|
||||
*
|
||||
* @param model the model this element belongs to
|
||||
* @throws NodeException NodeException
|
||||
*/
|
||||
default void init(Model model) throws NodeException {
|
||||
|
@ -38,6 +38,7 @@ public class ImmutableList<T> implements List<T> {
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param items items
|
||||
* @param <U> the item type
|
||||
*/
|
||||
public <U extends T> ImmutableList(ImmutableList<U> items) {
|
||||
this.items = items.items;
|
||||
|
@ -69,9 +69,10 @@ public class PinInfo implements PinDescription {
|
||||
/**
|
||||
* Creates a new pin
|
||||
*
|
||||
* @param name the pins name
|
||||
* @param description the pins description
|
||||
* @param direction the pins direction
|
||||
* @param name the pins name
|
||||
* @param description the pins description
|
||||
* @param direction the pins direction
|
||||
* @param pullResistor the connected pullResistor
|
||||
*/
|
||||
public PinInfo(String name, String description, Direction direction, PullResistor pullResistor) {
|
||||
this.description = description;
|
||||
|
@ -41,7 +41,8 @@ public class Switch implements Element, Observer {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param attr the elements attributes
|
||||
* @param attr the elements attributes
|
||||
* @param closed true if switch is closed
|
||||
*/
|
||||
public Switch(ElementAttributes attr, boolean closed) {
|
||||
bits = attr.getBits();
|
||||
|
@ -309,8 +309,9 @@ public class Circuit {
|
||||
* Returns a list of all Moveables in the given rectangle.
|
||||
* It creates a deep copy of all elements.
|
||||
*
|
||||
* @param min upper left corner of the rectangle
|
||||
* @param max lower right corner of the rectangle
|
||||
* @param min upper left corner of the rectangle
|
||||
* @param max lower right corner of the rectangle
|
||||
* @param shapeFactory the shape factory
|
||||
* @return the list
|
||||
*/
|
||||
public ArrayList<Moveable> getElementsToCopy(Vector min, Vector max, ShapeFactory shapeFactory) {
|
||||
@ -403,7 +404,8 @@ public class Circuit {
|
||||
/**
|
||||
* Returns a list of elements at the given position
|
||||
*
|
||||
* @param pos the cursor position
|
||||
* @param pos the cursor position
|
||||
* @param includeText if true the element is also returned if only the text matches the given position
|
||||
* @return the elements or an empty list if there is no element at the given position
|
||||
*/
|
||||
public List<VisualElement> getElementListAt(Vector pos, boolean includeText) {
|
||||
@ -489,7 +491,8 @@ public class Circuit {
|
||||
/**
|
||||
* Returns the matching wire
|
||||
*
|
||||
* @param pos the position
|
||||
* @param pos the position
|
||||
* @param radius the catching distance
|
||||
* @return the matching wire or null
|
||||
*/
|
||||
public Wire getWireAt(Vector pos, int radius) {
|
||||
|
@ -114,7 +114,8 @@ public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
/**
|
||||
* Checks if the given point is within the bounding box of the shape of this element.
|
||||
*
|
||||
* @param p a position
|
||||
* @param p a position
|
||||
* @param includeText true if a click on a text also selectes the element
|
||||
* @return true if p is inside the bounding box of the shape of this element.
|
||||
*/
|
||||
public boolean matches(Vector p, boolean includeText) {
|
||||
@ -195,6 +196,7 @@ public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
}
|
||||
|
||||
/**
|
||||
* @param includeText true if a click on a text also selectes the element
|
||||
* @return the bounding box of the shape of this element, text is ignored
|
||||
*/
|
||||
public GraphicMinMax getMinMax(boolean includeText) {
|
||||
@ -300,6 +302,7 @@ public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
* @param cc the calling {@link CircuitComponent}
|
||||
* @param pos the position
|
||||
* @param posInComponent position in CircuitComponent
|
||||
* @param modelSync used to access the running model
|
||||
* @return true if model is changed
|
||||
*/
|
||||
public boolean elementClicked(CircuitComponent cc, Point pos, Vector posInComponent, Sync modelSync) {
|
||||
@ -316,6 +319,7 @@ public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
* @param cc the calling {@link CircuitComponent}
|
||||
* @param pos the position
|
||||
* @param posInComponent position in CircuitComponent
|
||||
* @param modelSync used to access the running model
|
||||
* @return true if model is changed
|
||||
*/
|
||||
public boolean elementPressed(CircuitComponent cc, Point pos, Vector posInComponent, Sync modelSync) {
|
||||
@ -332,6 +336,7 @@ public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
* @param cc the calling {@link CircuitComponent}
|
||||
* @param pos the position
|
||||
* @param posInComponent position in CircuitComponent
|
||||
* @param modelSync used to access the running model
|
||||
* @return true if model is changed
|
||||
*/
|
||||
public boolean elementReleased(CircuitComponent cc, Point pos, Vector posInComponent, Sync modelSync) {
|
||||
@ -348,6 +353,7 @@ public class VisualElement implements Drawable, Moveable, AttributeListener {
|
||||
* @param cc the calling {@link CircuitComponent}
|
||||
* @param pos the position
|
||||
* @param posInComponent position in CircuitComponent
|
||||
* @param modelSync used to access the running model
|
||||
* @return true if model is changed
|
||||
*/
|
||||
public boolean elementDragged(CircuitComponent cc, Point pos, Vector posInComponent, Sync modelSync) {
|
||||
|
@ -21,10 +21,11 @@ public final class GraphicsImage extends GraphicSwing implements Closeable {
|
||||
* @param min upper left corner
|
||||
* @param max lower right corner
|
||||
* @param format the format to write
|
||||
* @param scale the scaling of the created image
|
||||
* @return the {@link Graphic} instance
|
||||
*/
|
||||
public static GraphicsImage create(OutputStream out, Vector min, Vector max, String format, float scale) {
|
||||
int thickness = Style.NORMAL.getThickness();
|
||||
int thickness = Style.MAXLINETHICK;
|
||||
BufferedImage bi
|
||||
= new BufferedImage(
|
||||
Math.round((max.x - min.x + thickness * 2) * scale),
|
||||
|
@ -42,7 +42,7 @@ public class Vector {
|
||||
/**
|
||||
* returns the minimum vector from the given vectors.
|
||||
*
|
||||
* @param p
|
||||
* @param p the vectors to evaluate
|
||||
* @return the minimum
|
||||
*/
|
||||
public static Vector min(Vector... p) {
|
||||
@ -58,7 +58,7 @@ public class Vector {
|
||||
/**
|
||||
* returns the maximim vector from the given vectors.
|
||||
*
|
||||
* @param p
|
||||
* @param p the vectors to evaluate
|
||||
* @return the maximum
|
||||
*/
|
||||
public static Vector max(Vector... p) {
|
||||
|
@ -45,6 +45,7 @@ public class CustomElement implements Element {
|
||||
* Every time this method is called a new {@link ModelCreator} is created.
|
||||
*
|
||||
* @param subName name of the circuit, used to name unique elements
|
||||
* @param depth recursion depth, used to detect a circuit which contains itself
|
||||
* @return the {@link ModelCreator}
|
||||
* @throws PinException PinException
|
||||
* @throws NodeException NodeException
|
||||
|
@ -72,6 +72,7 @@ public class ModelCreator implements Iterable<ModelEntry> {
|
||||
* @param fileName only used for better messages in exceptions
|
||||
* @param netList the NetList of the model. If known it is not necessary to create it.
|
||||
* @param subName name of the circuit, used to name unique elements
|
||||
* @param depth recursion depth, used to detect a circuit which contains itself
|
||||
* @throws PinException PinException
|
||||
* @throws NodeException NodeException
|
||||
* @throws ElementNotFoundException ElementNotFoundException
|
||||
|
@ -36,10 +36,12 @@ public class RealTimeClock implements ModelStateObserver {
|
||||
/**
|
||||
* Creates a new real time clock
|
||||
*
|
||||
* @param model the model
|
||||
* @param clock the clock element which is modify
|
||||
* @param executor the executor used to schedule the update
|
||||
* @param status allows sending messages to the status line
|
||||
* @param model the model
|
||||
* @param clock the clock element which is modify
|
||||
* @param executor the executor used to schedule the update
|
||||
* @param stopper used to stop the model if an error is detected
|
||||
* @param modelSync used to access a running model
|
||||
* @param status allows sending messages to the status line
|
||||
*/
|
||||
public RealTimeClock(Model model, Clock clock, ScheduledThreadPoolExecutor executor, ErrorStopper stopper, Sync modelSync, StatusInterface status) {
|
||||
this.model = model;
|
||||
|
@ -41,9 +41,10 @@ public class DriverShape implements Shape {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param attr the attributes
|
||||
* @param inputs the inputs
|
||||
* @param outputs the outputs
|
||||
* @param attr the attributes
|
||||
* @param inputs the inputs
|
||||
* @param outputs the outputs
|
||||
* @param invertedInput true if input is inverted
|
||||
*/
|
||||
public DriverShape(ElementAttributes attr, PinDescriptions inputs, PinDescriptions outputs, boolean invertedInput) {
|
||||
this.inputs = inputs;
|
||||
|
@ -23,6 +23,8 @@ public class TextShape implements Shape {
|
||||
* Create a new instance
|
||||
*
|
||||
* @param attr attributes
|
||||
* @param inputs the inputs
|
||||
* @param outputs the outputs
|
||||
*/
|
||||
public TextShape(ElementAttributes attr, PinDescriptions inputs, PinDescriptions outputs) {
|
||||
String text = attr.getLabel();
|
||||
|
@ -25,7 +25,8 @@ public class InsertHistory implements LibraryListener {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param bar the toolbar to put the elements to
|
||||
* @param bar the toolbar to put the elements to
|
||||
* @param library the library to use
|
||||
*/
|
||||
public InsertHistory(JToolBar bar, ElementLibrary library) {
|
||||
this.bar = bar;
|
||||
|
@ -150,8 +150,9 @@ public class Main extends JFrame implements ClosingWindowListener.ConfirmSave, E
|
||||
* Creates a new instance.
|
||||
* Used to show a generated circuit.
|
||||
*
|
||||
* @param parent the parent component
|
||||
* @param circuit circuit to show
|
||||
* @param parent the parent component
|
||||
* @param parentsLibrary the library used by the parent window
|
||||
* @param circuit circuit to show
|
||||
*/
|
||||
public Main(Component parent, ElementLibrary parentsLibrary, Circuit circuit) {
|
||||
this(parent, null, parentsLibrary, circuit);
|
||||
|
@ -94,6 +94,7 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent window
|
||||
* @param library the library used to edit the attributes of the elements
|
||||
* @param shapeFactory the shapeFactory used for copied elements
|
||||
*/
|
||||
@ -331,7 +332,8 @@ public class CircuitComponent extends JComponent implements Circuit.ChangedListe
|
||||
/**
|
||||
* Sets the edit mode and resets the circuit
|
||||
*
|
||||
* @param runMode true if running, false if editing
|
||||
* @param runMode true if running, false if editing
|
||||
* @param modelSync used to access the running model
|
||||
*/
|
||||
public void setModeAndReset(boolean runMode, Sync modelSync) {
|
||||
this.modelSync = modelSync;
|
||||
|
@ -29,8 +29,12 @@ public class DataEditor extends JDialog {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent
|
||||
* @param dataField the data to edit
|
||||
* @param parent the parent
|
||||
* @param dataField the data to edit
|
||||
* @param size the size of the data field to edit
|
||||
* @param bits the bit count of the values to edit
|
||||
* @param modelIsRunning true if model is running
|
||||
* @param modelSync used to access the running model
|
||||
*/
|
||||
public DataEditor(Component parent, DataField dataField, int size, int bits, boolean modelIsRunning, Sync modelSync) {
|
||||
super(SwingUtilities.windowForComponent(parent), Lang.get("key_Data"), modelIsRunning ? ModalityType.MODELESS : ModalityType.APPLICATION_MODAL);
|
||||
|
@ -59,8 +59,9 @@ public class ElementHelpDialog extends JDialog {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parents dialog
|
||||
* @param library the elements library
|
||||
* @param parent the parents dialog
|
||||
* @param library the elements library
|
||||
* @param shapeFactory the shape factory used to create the PNGs
|
||||
* @throws PinException PinException
|
||||
* @throws NodeException NodeException
|
||||
*/
|
||||
|
@ -33,7 +33,7 @@ public class ProbeDialog extends JDialog implements ModelStateObserver {
|
||||
* @param model the model to run
|
||||
* @param type the event type which fires a dialog repaint
|
||||
* @param ordering the names list used to order the measurement values
|
||||
* @param modelSync
|
||||
* @param modelSync used to access the running model
|
||||
*/
|
||||
public ProbeDialog(Frame owner, Model model, ModelEvent type, List<String> ordering, Sync modelSync) {
|
||||
super(owner, Lang.get("win_measures"), false);
|
||||
|
@ -210,8 +210,9 @@ public final class SingleValueDialog extends JDialog {
|
||||
/**
|
||||
* Edits a single value
|
||||
*
|
||||
* @param pos the position to pop up the dialog
|
||||
* @param value the value to edit
|
||||
* @param pos the position to pop up the dialog
|
||||
* @param value the value to edit
|
||||
* @param modelSync used to access the running model
|
||||
*/
|
||||
public static void editValue(Point pos, ObservableValue value, Sync modelSync) {
|
||||
SingleValueDialog svd = new SingleValueDialog(pos, value);
|
||||
|
@ -27,6 +27,7 @@ public class WindowPosManager {
|
||||
*
|
||||
* @param id the id of the window
|
||||
* @param window the window itself
|
||||
* @param <T> the type of the window
|
||||
* @return the window for chained calls
|
||||
*/
|
||||
public <T extends Window> T register(String id, T window) {
|
||||
|
@ -39,6 +39,7 @@ public class DataSetDialog extends JDialog implements ModelStateObserver {
|
||||
* @param model the model used to collect the data
|
||||
* @param microStep true the event type which triggers a new DataSample
|
||||
* @param ordering the ordering of the measurement values
|
||||
* @param modelSync used to access the running model
|
||||
*/
|
||||
public DataSetDialog(Frame owner, Model model, boolean microStep, List<String> ordering, Sync modelSync) {
|
||||
super(owner, createTitle(microStep), false);
|
||||
|
@ -30,6 +30,7 @@ public class ExpressionDialog extends JDialog {
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent
|
||||
* @param library the library to use
|
||||
* @param shapeFactory the shapeFactory used for new circuits
|
||||
*/
|
||||
public ExpressionDialog(Main parent, ElementLibrary library, ShapeFactory shapeFactory) {
|
||||
|
@ -32,7 +32,7 @@ public class ExpressionCreator {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param theTable the table to use
|
||||
* @param theTable the table to use
|
||||
*/
|
||||
public ExpressionCreator(TruthTable theTable) {
|
||||
this.theTable = theTable;
|
||||
@ -41,6 +41,7 @@ public class ExpressionCreator {
|
||||
/**
|
||||
* Creates the expressions
|
||||
*
|
||||
* @param listener the listener to report the found expressions to
|
||||
* @throws ExpressionException ExpressionException
|
||||
* @throws FormatterException FormatterException
|
||||
* @throws AnalyseException AnalyseException
|
||||
|
@ -15,6 +15,7 @@ public class ShowStringDialog extends JDialog {
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent
|
||||
* @param title the dialog title
|
||||
* @param str the text to show
|
||||
*/
|
||||
public ShowStringDialog(JFrame parent, String title, String str) {
|
||||
@ -26,6 +27,7 @@ public class ShowStringDialog extends JDialog {
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent
|
||||
* @param title the dialog title
|
||||
* @param str the text to show
|
||||
*/
|
||||
public ShowStringDialog(JDialog parent, String title, String str) {
|
||||
@ -36,6 +38,7 @@ public class ShowStringDialog extends JDialog {
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent
|
||||
* @param title the dialog title
|
||||
* @param str the text to show
|
||||
* @param html is the string a html string?
|
||||
*/
|
||||
|
@ -84,8 +84,11 @@ public class TableDialog extends JDialog {
|
||||
/**
|
||||
* Creates a new instance
|
||||
*
|
||||
* @param parent the parent frame
|
||||
* @param truthTable the table to show
|
||||
* @param parent the parent frame
|
||||
* @param truthTable the table to show
|
||||
* @param library the library to use
|
||||
* @param shapeFactory the shape factory
|
||||
* @param filename the file name used to create the names of the created files
|
||||
*/
|
||||
public TableDialog(JFrame parent, TruthTable truthTable, ElementLibrary library, ShapeFactory shapeFactory, File filename) {
|
||||
super(parent, Lang.get("win_table"));
|
||||
|
@ -178,6 +178,8 @@ public class TextLineNumber extends JPanel
|
||||
* <li>TextLineNumber.CENTER
|
||||
* <li>TextLineNumber.RIGHT (default)
|
||||
* </ul>
|
||||
*
|
||||
* @param digitAlignment alignment of the digits
|
||||
*/
|
||||
public void setDigitAlignment(float digitAlignment) {
|
||||
this.digitAlignment =
|
||||
@ -288,6 +290,7 @@ public class TextLineNumber extends JPanel
|
||||
* Get the line number to be drawn. The empty string will be returned
|
||||
* when a line of text has wrapped.
|
||||
*
|
||||
* @param rowStartOffset offset of the line
|
||||
* @return line number or empty string
|
||||
*/
|
||||
protected String getTextLineNumber(int rowStartOffset) {
|
||||
|
@ -38,6 +38,7 @@ public class ClosingWindowListener extends WindowAdapter {
|
||||
*
|
||||
* @param parent the parent component of the confirm dialog
|
||||
* @param confirmSave the ConfirmSave interface
|
||||
* @param doExit if true the parent JFrame is disposed by this listener
|
||||
*/
|
||||
public ClosingWindowListener(final JFrame parent, final ConfirmSave confirmSave, final boolean doExit) {
|
||||
this((Component) parent, new GUICloser() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user