mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-10 17:22:09 +10:00
doc
This commit is contained in:
+1
-1
@@ -1,4 +1,4 @@
|
|||||||
package org.diylc.presenter;
|
package org.diylc.common;
|
||||||
|
|
||||||
import javax.swing.Icon;
|
import javax.swing.Icon;
|
||||||
|
|
||||||
-1
@@ -3,7 +3,6 @@ package org.diylc.common;
|
|||||||
import java.awt.Rectangle;
|
import java.awt.Rectangle;
|
||||||
|
|
||||||
import org.diylc.core.Project;
|
import org.diylc.core.Project;
|
||||||
import org.diylc.presenter.ComponentType;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
-1
@@ -17,7 +17,6 @@ import javax.swing.JPopupMenu.Separator;
|
|||||||
import org.diylc.core.ComponentLayer;
|
import org.diylc.core.ComponentLayer;
|
||||||
import org.diylc.core.IDIYComponent;
|
import org.diylc.core.IDIYComponent;
|
||||||
import org.diylc.core.Project;
|
import org.diylc.core.Project;
|
||||||
import org.diylc.presenter.ComponentType;
|
|
||||||
|
|
||||||
import com.diyfever.gui.simplemq.IMessageListener;
|
import com.diyfever.gui.simplemq.IMessageListener;
|
||||||
import com.diyfever.gui.simplemq.MessageDispatcher;
|
import com.diyfever.gui.simplemq.MessageDispatcher;
|
||||||
|
|||||||
+17
-4
@@ -3,18 +3,31 @@ package org.diylc.core;
|
|||||||
import java.awt.Graphics2D;
|
import java.awt.Graphics2D;
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
|
|
||||||
import org.diylc.presenter.ComponentType;
|
import org.diylc.core.annotations.ComponentDescriptor;
|
||||||
|
import org.diylc.core.annotations.ComponentName;
|
||||||
|
import org.diylc.core.annotations.ComponentValue;
|
||||||
|
import org.diylc.core.annotations.ControlPoint;
|
||||||
|
import org.diylc.core.annotations.EditableProperty;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for component instance. Implementation classes of this interface
|
* Interface for component instance. Implementation classes of this interface
|
||||||
* will be instantiated by the application when component is added to the
|
* will be instantiated by the application when component is added to the
|
||||||
* canvas. <br>
|
* canvas. <br>
|
||||||
* <br>
|
* <br>
|
||||||
* <b>Note: </b>Implementing classes must have an empty constructor.
|
* <b>Implementing classes should meet the following: </b>
|
||||||
|
* <ul>
|
||||||
|
* <li>Must have an empty constructor.</li>
|
||||||
|
* <li>Class should be annotated with {@link ComponentDescriptor}.</li>
|
||||||
|
* <li>Exactly one getter should be annotated with {@link ComponentName}.</li>
|
||||||
|
* <li>Exactly one getter should be annotated with {@link ComponentValue}.</li>
|
||||||
|
* <li>Control point getters need to be annotated with {@link ControlPoint}.</li>
|
||||||
|
* <li>Getters for properties editable by users should be annotated with
|
||||||
|
* {@link EditableProperty}.</li>
|
||||||
|
* <li>Component configuration should be declared using
|
||||||
|
* <code>public static</code> fields so they can be set through config file.</li>
|
||||||
|
* </ul>
|
||||||
*
|
*
|
||||||
* @author Branislav Stojkovic
|
* @author Branislav Stojkovic
|
||||||
*
|
|
||||||
* @see ComponentType
|
|
||||||
*/
|
*/
|
||||||
public interface IDIYComponent extends Serializable {
|
public interface IDIYComponent extends Serializable {
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -6,11 +6,10 @@ import java.lang.annotation.RetentionPolicy;
|
|||||||
|
|
||||||
import org.diylc.core.VisibilityPolicy;
|
import org.diylc.core.VisibilityPolicy;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Annotation for control points. This annotation may be added fields of type
|
* Annotation for control points. This annotation may be added fields of type
|
||||||
* {@link Point} only when both getters and setters exist. Annotation is added
|
* {@link Point} only when both getters and setters exist. Annotation is added
|
||||||
* always on the getter.
|
* always on the getter and it must return {@link Point} values.
|
||||||
*
|
*
|
||||||
* @author Branislav Stojkovic
|
* @author Branislav Stojkovic
|
||||||
*/
|
*/
|
||||||
|
|||||||
+1
-1
@@ -17,13 +17,13 @@ import javax.swing.JPanel;
|
|||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
|
|
||||||
import org.diylc.common.BadPositionException;
|
import org.diylc.common.BadPositionException;
|
||||||
|
import org.diylc.common.ComponentType;
|
||||||
import org.diylc.common.ControlPointWrapper;
|
import org.diylc.common.ControlPointWrapper;
|
||||||
import org.diylc.common.EventType;
|
import org.diylc.common.EventType;
|
||||||
import org.diylc.common.IPlugIn;
|
import org.diylc.common.IPlugIn;
|
||||||
import org.diylc.common.IPlugInPort;
|
import org.diylc.common.IPlugInPort;
|
||||||
import org.diylc.core.IDIYComponent;
|
import org.diylc.core.IDIYComponent;
|
||||||
import org.diylc.presenter.ComponentProcessor;
|
import org.diylc.presenter.ComponentProcessor;
|
||||||
import org.diylc.presenter.ComponentType;
|
|
||||||
|
|
||||||
import com.diyfever.gui.MemoryBar;
|
import com.diyfever.gui.MemoryBar;
|
||||||
import com.diyfever.gui.miscutils.PercentageListCellRenderer;
|
import com.diyfever.gui.miscutils.PercentageListCellRenderer;
|
||||||
|
|||||||
+1
-1
@@ -7,8 +7,8 @@ import java.awt.event.ActionListener;
|
|||||||
|
|
||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
|
|
||||||
|
import org.diylc.common.ComponentType;
|
||||||
import org.diylc.common.IPlugInPort;
|
import org.diylc.common.IPlugInPort;
|
||||||
import org.diylc.presenter.ComponentType;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* {@link JButton} that displays component type icon and instantiates the
|
* {@link JButton} that displays component type icon and instantiates the
|
||||||
|
|||||||
+1
-1
@@ -8,8 +8,8 @@ import javax.swing.BoxLayout;
|
|||||||
import javax.swing.JButton;
|
import javax.swing.JButton;
|
||||||
import javax.swing.JTabbedPane;
|
import javax.swing.JTabbedPane;
|
||||||
|
|
||||||
|
import org.diylc.common.ComponentType;
|
||||||
import org.diylc.common.IPlugInPort;
|
import org.diylc.common.IPlugInPort;
|
||||||
import org.diylc.presenter.ComponentType;
|
|
||||||
|
|
||||||
|
|
||||||
class ComponentTabbedPane extends JTabbedPane {
|
class ComponentTabbedPane extends JTabbedPane {
|
||||||
|
|||||||
+1
@@ -32,6 +32,7 @@ import javax.swing.JComponent;
|
|||||||
import org.apache.log4j.Logger;
|
import org.apache.log4j.Logger;
|
||||||
import org.diylc.common.BadPositionException;
|
import org.diylc.common.BadPositionException;
|
||||||
import org.diylc.common.ComponentSelection;
|
import org.diylc.common.ComponentSelection;
|
||||||
|
import org.diylc.common.ComponentType;
|
||||||
import org.diylc.common.ControlPointWrapper;
|
import org.diylc.common.ControlPointWrapper;
|
||||||
import org.diylc.common.DrawOption;
|
import org.diylc.common.DrawOption;
|
||||||
import org.diylc.common.EventType;
|
import org.diylc.common.EventType;
|
||||||
|
|||||||
Reference in New Issue
Block a user