diff --git a/diylc/diylc-core/.classpath b/diylc/diylc-core/.classpath index 0ff43279..ad4f9a9e 100644 --- a/diylc/diylc-core/.classpath +++ b/diylc/diylc-core/.classpath @@ -1,20 +1,67 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/diylc/diylc-core/.project b/diylc/diylc-core/.project index 4aeb0445..8ea4afa3 100644 --- a/diylc/diylc-core/.project +++ b/diylc/diylc-core/.project @@ -10,8 +10,14 @@ + + org.eclipse.m2e.core.maven2Builder + + + + org.eclipse.m2e.core.maven2Nature org.eclipse.jdt.core.javanature diff --git a/diylc/diylc-core/src/main/java/org/diylc/announcements/Announcement.java b/diylc/diylc-core/src/main/java/org/diylc/announcements/Announcement.java index 45000a04..75b1b938 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/announcements/Announcement.java +++ b/diylc/diylc-core/src/main/java/org/diylc/announcements/Announcement.java @@ -1,24 +1,24 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.announcements; import java.io.Serializable; diff --git a/diylc/diylc-core/src/main/java/org/diylc/announcements/AnnouncementProvider.java b/diylc/diylc-core/src/main/java/org/diylc/announcements/AnnouncementProvider.java index ff6d99b7..2ed67b64 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/announcements/AnnouncementProvider.java +++ b/diylc/diylc-core/src/main/java/org/diylc/announcements/AnnouncementProvider.java @@ -1,41 +1,43 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.announcements; -import java.text.DateFormat; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.List; -import java.util.UUID; -import org.diylc.appframework.miscutils.ConfigurationManager; -import org.diylc.plugins.cloud.model.IServiceAPI; -import com.diyfever.httpproxy.PhpFlatProxy; +import java.text.DateFormat; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.UUID; +import org.diylc.appframework.miscutils.ConfigurationManager; + +import com.diyfever.httpproxy.PhpFlatProxy; import com.diyfever.httpproxy.ProxyFactory; +import org.diylc.plugins.cloud.model.IServiceAPI; + public class AnnouncementProvider { private String serviceUrl = "http://www.diy-fever.com/diylc/api/v1/announcements.html"; - private String LAST_READ_KEY = "announcement.lastReadDate"; + private String LAST_READ_KEY = "announcement.lastReadDate"; private String USER_ID_KEY = "userId"; private IAnnouncementService service; @@ -55,20 +57,20 @@ public class AnnouncementProvider { ConfigurationManager.getInstance().readString(IServiceAPI.URL_KEY, "http://www.diy-fever.com/diylc/api/v1"); ProxyFactory factory = new ProxyFactory(new PhpFlatProxy()); service = factory.createProxy(IAnnouncementService.class, serviceUrl); - } - - private String getUserId() { - String userId = ConfigurationManager.getInstance().readString(USER_ID_KEY, null); - if (userId == null) { - userId = UUID.randomUUID().toString(); - ConfigurationManager.getInstance().writeValue(USER_ID_KEY, userId); - } - return userId; + } + + private String getUserId() { + String userId = ConfigurationManager.getInstance().readString(USER_ID_KEY, null); + if (userId == null) { + userId = UUID.randomUUID().toString(); + ConfigurationManager.getInstance().writeValue(USER_ID_KEY, userId); + } + return userId; } public String getCurrentAnnouncements(boolean forceLast) throws ParseException { - announcements = service.getAnnouncements(getUserId()); - if (announcements == null) + announcements = service.getAnnouncements(getUserId()); + if (announcements == null) return null; boolean hasUnread = false; StringBuilder sb = new StringBuilder(""); diff --git a/diylc/diylc-core/src/main/java/org/diylc/announcements/IAnnouncementService.java b/diylc/diylc-core/src/main/java/org/diylc/announcements/IAnnouncementService.java index c291a771..82663f26 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/announcements/IAnnouncementService.java +++ b/diylc/diylc-core/src/main/java/org/diylc/announcements/IAnnouncementService.java @@ -19,12 +19,12 @@ along with DIYLC. If not, see . */ -package org.diylc.announcements; - +package org.diylc.announcements; + import java.util.List; -import com.diyfever.httpproxy.ParamName; - -public interface IAnnouncementService { - - public List getAnnouncements(@ParamName("userId")String userId); -} +import com.diyfever.httpproxy.ParamName; + +public interface IAnnouncementService { + + public List getAnnouncements(@ParamName("userId")String userId); +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferable.java b/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferable.java index 30d5e9fe..6ad86357 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferable.java +++ b/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferable.java @@ -19,8 +19,8 @@ along with DIYLC. If not, see . */ -package org.diylc.clipboard; - +package org.diylc.clipboard; + import java.awt.datatransfer.DataFlavor; import java.awt.datatransfer.Transferable; import java.awt.datatransfer.UnsupportedFlavorException; @@ -28,55 +28,56 @@ import java.io.IOException; import java.io.Serializable; import java.util.List; import java.util.Set; -import org.diylc.core.IDIYComponent; - -/** - * Represents component selection as a {@link List} of {@link IDIYComponent} objects. Implements - * {@link Transferable}, so it is suitable for clipboard usage. - * - * @author Branislav Stojkovic - */ -public class ComponentTransferable implements Transferable, Serializable { - - private static final long serialVersionUID = 1L; - + +import org.diylc.core.IDIYComponent; + +/** + * Represents component selection as a {@link List} of {@link IDIYComponent} objects. Implements + * {@link Transferable}, so it is suitable for clipboard usage. + * + * @author Branislav Stojkovic + */ +public class ComponentTransferable implements Transferable, Serializable { + + private static final long serialVersionUID = 1L; + public static final DataFlavor listFlavor = new DataFlavor(ComponentTransferable.class, "application/diylc"); private List> components; - private Set>> groups; - - public ComponentTransferable() { - super(); + private Set>> groups; + + public ComponentTransferable() { + super(); } public ComponentTransferable(List> components) { super(); this.components = components; this.groups = null; - } - - public ComponentTransferable(List> components, Set>> groups) { + } + + public ComponentTransferable(List> components, Set>> groups) { super(); this.components = components; - this.groups = groups; - } - - @Override - public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { - if (flavor.equals(listFlavor)) { - return this; - } - throw new UnsupportedFlavorException(flavor); - } - - @Override - public DataFlavor[] getTransferDataFlavors() { - return new DataFlavor[] {listFlavor}; - } - - @Override - public boolean isDataFlavorSupported(DataFlavor flavor) { - return flavor.equals(listFlavor); + this.groups = groups; + } + + @Override + public Object getTransferData(DataFlavor flavor) throws UnsupportedFlavorException, IOException { + if (flavor.equals(listFlavor)) { + return this; + } + throw new UnsupportedFlavorException(flavor); + } + + @Override + public DataFlavor[] getTransferDataFlavors() { + return new DataFlavor[] {listFlavor}; + } + + @Override + public boolean isDataFlavorSupported(DataFlavor flavor) { + return flavor.equals(listFlavor); } public List> getComponents() { @@ -85,5 +86,5 @@ public class ComponentTransferable implements Transferable, Serializable { public Set>> getGroups() { return groups; - } -} + } +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferableFactory.java b/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferableFactory.java index 9aa9802a..7c13438e 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferableFactory.java +++ b/diylc/diylc-core/src/main/java/org/diylc/clipboard/ComponentTransferableFactory.java @@ -25,6 +25,7 @@ import java.util.Objects; import java.util.Set; import java.util.stream.Collectors; import org.apache.log4j.Logger; + import org.diylc.core.IDIYComponent; public class ComponentTransferableFactory { diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/BadPositionException.java b/diylc/diylc-core/src/main/java/org/diylc/common/BadPositionException.java index 6173a8cd..c6c6e41c 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/BadPositionException.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/BadPositionException.java @@ -19,10 +19,10 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - -public class BadPositionException extends Exception { - - private static final long serialVersionUID = 1L; - -} +package org.diylc.common; + +public class BadPositionException extends Exception { + + private static final long serialVersionUID = 1L; + +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlock.java b/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlock.java index ad336d38..1d39414b 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlock.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlock.java @@ -1,27 +1,28 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; -import java.util.Collection; +import java.util.Collection; + import org.diylc.core.IDIYComponent; public class BuildingBlock { diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlockPackage.java b/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlockPackage.java index db3fbf5b..0466025a 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlockPackage.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/BuildingBlockPackage.java @@ -23,6 +23,7 @@ package org.diylc.common; import java.util.List; import java.util.Map; + import org.diylc.core.IDIYComponent; public class BuildingBlockPackage { diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/ComponentType.java b/diylc/diylc-core/src/main/java/org/diylc/common/ComponentType.java index 54c44b41..6c0985ee 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/ComponentType.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/ComponentType.java @@ -20,6 +20,7 @@ package org.diylc.common; import java.io.Serializable; import java.util.List; import javax.swing.Icon; + import org.diylc.core.CreationMethod; import org.diylc.core.IDIYComponent; import org.diylc.core.annotations.BomPolicy; diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/DefaultComponentTransformer.java b/diylc/diylc-core/src/main/java/org/diylc/common/DefaultComponentTransformer.java index 6fb4e290..ef61e570 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/DefaultComponentTransformer.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/DefaultComponentTransformer.java @@ -5,6 +5,7 @@ import java.awt.geom.Point2D; import java.lang.reflect.InvocationTargetException; import java.util.List; import org.apache.log4j.Logger; + import org.diylc.core.Angle; import org.diylc.core.IDIYComponent; import org.diylc.presenter.ComponentProcessor; diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/Display.java b/diylc/diylc-core/src/main/java/org/diylc/common/Display.java index f39b09e4..11120a23 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/Display.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/Display.java @@ -19,14 +19,14 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - -public enum Display { - - NAME, VALUE, NONE, BOTH; - - @Override - public String toString() { - return name().substring(0, 1) + name().substring(1).toLowerCase(); - } -} +package org.diylc.common; + +public enum Display { + + NAME, VALUE, NONE, BOTH; + + @Override + public String toString() { + return name().substring(0, 1) + name().substring(1).toLowerCase(); + } +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/DrawOption.java b/diylc/diylc-core/src/main/java/org/diylc/common/DrawOption.java index 6c0f9ee0..01182ec5 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/DrawOption.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/DrawOption.java @@ -1,24 +1,24 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; import java.awt.Graphics; @@ -56,17 +56,17 @@ public enum DrawOption { /** * Draw components in outline mode. */ - OUTLINE_MODE, - /** - * Include extra space around the layout. - */ - EXTRA_SPACE, - /** - * Whether components should be cached or not. - */ - ENABLE_CACHING, - /** - * Whether locked components should be rendered as transparent or not. - */ + OUTLINE_MODE, + /** + * Include extra space around the layout. + */ + EXTRA_SPACE, + /** + * Whether components should be cached or not. + */ + ENABLE_CACHING, + /** + * Whether locked components should be rendered as transparent or not. + */ LOCKED_ALPHA; } diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/EventType.java b/diylc/diylc-core/src/main/java/org/diylc/common/EventType.java index e7eb8359..0367deef 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/EventType.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/EventType.java @@ -1,28 +1,29 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; -import java.awt.Rectangle; -import java.awt.geom.Point2D; +import java.awt.Rectangle; +import java.awt.geom.Point2D; + import org.diylc.core.Project; /** @@ -84,7 +85,7 @@ public enum EventType { AVAILABLE_CTRL_POINTS_CHANGED, /** * Called when mouse cursor is moved. Point object is passed, containing the current cursor - * location (not taking zoom into account) in pixels and two {@link Point2D} objects with coordinates in + * location (not taking zoom into account) in pixels and two {@link Point2D} objects with coordinates in * inches and mm */ MOUSE_MOVED, @@ -101,9 +102,9 @@ public enum EventType { /** * Called to update the status message. New status message is passed as a first parameter. */ - STATUS_MESSAGE_CHANGED, - /** - * Signals the listeners to scroll to selection. - */ + STATUS_MESSAGE_CHANGED, + /** + * Signals the listeners to scroll to selection. + */ SCROLL_TO; } diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/GridType.java b/diylc/diylc-core/src/main/java/org/diylc/common/GridType.java index 4423bf5e..617183d4 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/GridType.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/GridType.java @@ -19,9 +19,9 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - -public enum GridType { - - LINES, CROSSHAIR, DOT, NONE; -} +package org.diylc.common; + +public enum GridType { + + LINES, CROSSHAIR, DOT, NONE; +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/HorizontalAlignment.java b/diylc/diylc-core/src/main/java/org/diylc/common/HorizontalAlignment.java index ee2c73b1..8d70a8af 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/HorizontalAlignment.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/HorizontalAlignment.java @@ -19,12 +19,12 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - -public enum HorizontalAlignment { - LEFT, CENTER, RIGHT; - - public String toString() { - return name().substring(0, 1) + name().substring(1).toLowerCase(); - } -} +package org.diylc.common; + +public enum HorizontalAlignment { + LEFT, CENTER, RIGHT; + + public String toString() { + return name().substring(0, 1) + name().substring(1).toLowerCase(); + } +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IBlockProcessor.java b/diylc/diylc-core/src/main/java/org/diylc/common/IBlockProcessor.java index 85aa96a7..ab13fd31 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IBlockProcessor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IBlockProcessor.java @@ -19,32 +19,32 @@ along with DIYLC. If not, see . */ -package org.diylc.common; +package org.diylc.common; import java.io.IOException; - -public interface IBlockProcessor { - + +public interface IBlockProcessor { + public static final String BLOCKS_KEY = "buildingBlocks"; - public static final String DEFAULT_BLOCKS_IMPORTED_KEY = "defaultBlocksImported"; - - void saveSelectionAsBlock(String blockName); - - void loadBlock(String blockName) throws InvalidBlockException; - + public static final String DEFAULT_BLOCKS_IMPORTED_KEY = "defaultBlocksImported"; + + void saveSelectionAsBlock(String blockName); + + void loadBlock(String blockName) throws InvalidBlockException; + void deleteBlock(String blockName); - int importBlocks(String fileName) throws IOException; - - public class BlockAlreadyExistsException extends Exception { - - private static final long serialVersionUID = 1L; - - } - - public class InvalidBlockException extends Exception { - - private static final long serialVersionUID = 1L; - - } -} + int importBlocks(String fileName) throws IOException; + + public class BlockAlreadyExistsException extends Exception { + + private static final long serialVersionUID = 1L; + + } + + public class InvalidBlockException extends Exception { + + private static final long serialVersionUID = 1L; + + } +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IComponentFilter.java b/diylc/diylc-core/src/main/java/org/diylc/common/IComponentFilter.java index 798a3c2f..d049c2b0 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IComponentFilter.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IComponentFilter.java @@ -19,11 +19,11 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - -import org.diylc.core.IDIYComponent; - -public interface IComponentFilter { - - boolean testComponent(IDIYComponent component); -} +package org.diylc.common; + +import org.diylc.core.IDIYComponent; + +public interface IComponentFilter { + + boolean testComponent(IDIYComponent component); +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IComponentTransformer.java b/diylc/diylc-core/src/main/java/org/diylc/common/IComponentTransformer.java index 847b73dc..6de83c5c 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IComponentTransformer.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IComponentTransformer.java @@ -19,26 +19,27 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - +package org.diylc.common; + import java.awt.geom.Point2D; -import org.diylc.core.IDIYComponent; - -public interface IComponentTransformer { - - public static final int CLOCKWISE = 1; - public static final int COUNTER_CLOCKWISE = 1; - - public static final int HORIZONTAL = 0; - public static final int VERTICAL = 1; - - boolean canRotate(IDIYComponent component); - - boolean canMirror(IDIYComponent component); - - boolean mirroringChangesCircuit(); - - void rotate(IDIYComponent component, Point2D center, int direction); - - void mirror(IDIYComponent component, Point2D center, int direction); -} + +import org.diylc.core.IDIYComponent; + +public interface IComponentTransformer { + + public static final int CLOCKWISE = 1; + public static final int COUNTER_CLOCKWISE = 1; + + public static final int HORIZONTAL = 0; + public static final int VERTICAL = 1; + + boolean canRotate(IDIYComponent component); + + boolean canMirror(IDIYComponent component); + + boolean mirroringChangesCircuit(); + + void rotate(IDIYComponent component, Point2D center, int direction); + + void mirror(IDIYComponent component, Point2D center, int direction); +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IKeyProcessor.java b/diylc/diylc-core/src/main/java/org/diylc/common/IKeyProcessor.java index 7fdff0b7..f9139411 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IKeyProcessor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IKeyProcessor.java @@ -1,24 +1,24 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; public interface IKeyProcessor { diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IMouseProcessor.java b/diylc/diylc-core/src/main/java/org/diylc/common/IMouseProcessor.java index 7b82cdf4..66f3712f 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IMouseProcessor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IMouseProcessor.java @@ -1,24 +1,24 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; import java.awt.Point; diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/INetlistAnalyzer.java b/diylc/diylc-core/src/main/java/org/diylc/common/INetlistAnalyzer.java index e92b21e8..aa5fda5c 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/INetlistAnalyzer.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/INetlistAnalyzer.java @@ -22,6 +22,7 @@ package org.diylc.common; import java.util.List; + import org.diylc.netlist.Netlist; import org.diylc.netlist.Node; import org.diylc.netlist.Summary; diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/INetlistProcessor.java b/diylc/diylc-core/src/main/java/org/diylc/common/INetlistProcessor.java index 3f539d0c..15f331d3 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/INetlistProcessor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/INetlistProcessor.java @@ -22,6 +22,7 @@ package org.diylc.common; import java.util.List; + import org.diylc.netlist.INetlistParser; import org.diylc.netlist.Netlist; import org.diylc.netlist.NetlistException; diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IPlugIn.java b/diylc/diylc-core/src/main/java/org/diylc/common/IPlugIn.java index 57d932d9..03994942 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IPlugIn.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IPlugIn.java @@ -19,22 +19,22 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - -import org.diylc.appframework.simplemq.IMessageListener; - -/** - * Interface for plug-ins. - * - * @author Branislav Stojkovic - */ -public interface IPlugIn extends IMessageListener { - - /** - * Method that connects the plug-in with {@link IPlugInPort}. Called by the application when - * plug-in is installed. - * - * @param plugInPort - */ - void connect(IPlugInPort plugInPort); -} +package org.diylc.common; + +import org.diylc.appframework.simplemq.IMessageListener; + +/** + * Interface for plug-ins. + * + * @author Branislav Stojkovic + */ +public interface IPlugIn extends IMessageListener { + + /** + * Method that connects the plug-in with {@link IPlugInPort}. Called by the application when + * plug-in is installed. + * + * @param plugInPort + */ + void connect(IPlugInPort plugInPort); +} diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IPlugInPort.java b/diylc/diylc-core/src/main/java/org/diylc/common/IPlugInPort.java index a23779bf..16779e43 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IPlugInPort.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IPlugInPort.java @@ -1,47 +1,48 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; -import java.awt.Cursor; -import java.awt.Dimension; -import java.awt.Graphics2D; -import java.awt.Point; -import java.awt.geom.Area; -import java.awt.geom.Point2D; -import java.awt.geom.Rectangle2D; -import java.util.List; -import java.util.Map; -import java.util.Set; -import org.diylc.appframework.simplemq.IMessageListener; -import org.diylc.appframework.simplemq.MessageDispatcher; -import org.diylc.appframework.update.Version; -import org.diylc.appframework.update.VersionNumber; -import org.diylc.clipboard.ComponentTransferable; -import org.diylc.core.IDIYComponent; -import org.diylc.core.Project; -import org.diylc.core.Template; -import org.diylc.core.Theme; -import org.diylc.core.measures.Size; -import org.diylc.test.ITestProcessor; +import java.awt.Cursor; +import java.awt.Dimension; +import java.awt.Graphics2D; +import java.awt.Point; +import java.awt.geom.Area; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; +import java.util.List; +import java.util.Map; +import java.util.Set; +import org.diylc.appframework.simplemq.IMessageListener; +import org.diylc.appframework.simplemq.MessageDispatcher; +import org.diylc.appframework.update.Version; +import org.diylc.appframework.update.VersionNumber; + +import org.diylc.clipboard.ComponentTransferable; +import org.diylc.core.IDIYComponent; +import org.diylc.core.Project; +import org.diylc.core.Template; +import org.diylc.core.Theme; +import org.diylc.core.measures.Size; +import org.diylc.test.ITestProcessor; /** * Interface for communication between plug-ins and the application. Plug-ins may acquire @@ -63,7 +64,7 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP public static final String EXPORT_GRID_KEY = "exportGrid"; public static final String STICKY_POINTS_KEY = "stickyPoints"; public static final String METRIC_KEY = "metric"; - + public static final String SNAP_TO_KEY = "snapTo"; public static final String CONTINUOUS_CREATION_KEY = "continuousCreation"; public static final String AUTO_EDIT_KEY = "autoEdit"; @@ -75,27 +76,27 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP public static final String RECENT_COMPONENTS_KEY = "recentComponents"; public static final String RECENT_FILES_KEY = "recentFiles"; public static final String SHOW_RULERS_KEY = "showRulers"; - public static final String SHOW_GRID_KEY = "showGrid"; - public static final String HIGHLIGHT_CONTINUITY_AREA = "highlightContinuityArea"; - public static final String HARDWARE_ACCELERATION = "hardwareAcceleration"; - public static final String EXTRA_SPACE_KEY = "extraSpace"; - public static final String FAVORITES_KEY = "favorites"; - public static final String RENUMBER_ON_PASTE_KEY = "renumberOnPaste"; - public static final String RULER_IN_SUBDIVISION_KEY = "rulerInSubdivision"; - public static final String CACHING_ENABLED_KEY = "cachingEnabled"; - - public static final String RULER_IN_SUBDIVISION_2 = "base of 2"; - public static final String RULER_IN_SUBDIVISION_10 = "base of 10"; - public static final String RULER_IN_SUBDIVISION_DEFAULT = RULER_IN_SUBDIVISION_10; - - public static final String SNAP_TO_NONE = "None"; - public static final String SNAP_TO_GRID = "Grid"; - public static final String SNAP_TO_COMPONENTS = "Components"; - public static final String SNAP_TO_DEFAULT = SNAP_TO_GRID; - - public static final String LOCKED_ALPHA = "lockedAlpha"; - - public static final String LANGUAGE = "language"; + public static final String SHOW_GRID_KEY = "showGrid"; + public static final String HIGHLIGHT_CONTINUITY_AREA = "highlightContinuityArea"; + public static final String HARDWARE_ACCELERATION = "hardwareAcceleration"; + public static final String EXTRA_SPACE_KEY = "extraSpace"; + public static final String FAVORITES_KEY = "favorites"; + public static final String RENUMBER_ON_PASTE_KEY = "renumberOnPaste"; + public static final String RULER_IN_SUBDIVISION_KEY = "rulerInSubdivision"; + public static final String CACHING_ENABLED_KEY = "cachingEnabled"; + + public static final String RULER_IN_SUBDIVISION_2 = "base of 2"; + public static final String RULER_IN_SUBDIVISION_10 = "base of 10"; + public static final String RULER_IN_SUBDIVISION_DEFAULT = RULER_IN_SUBDIVISION_10; + + public static final String SNAP_TO_NONE = "None"; + public static final String SNAP_TO_GRID = "Grid"; + public static final String SNAP_TO_COMPONENTS = "Components"; + public static final String SNAP_TO_DEFAULT = SNAP_TO_GRID; + + public static final String LOCKED_ALPHA = "lockedAlpha"; + + public static final String LANGUAGE = "language"; public static final String LANGUAGE_DEFAULT = "English"; public static final int DND_TOGGLE_STICKY = 0x1; @@ -114,7 +115,7 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * Each dimension is calculated as the product of the actual size and the number of pixels per * unit. If useZoom is set to true, the result is scaled by zoom factor. * - * @param useZoom + * @param useZoom * @param includeExtraSpace * * @return canvas dimensions @@ -126,9 +127,9 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * * Note: point coordinates are scaled for zoom factor. * - * @param point - * @param ctrlDown - * @param shiftDown + * @param point + * @param ctrlDown + * @param shiftDown * @param altDown * @return cursor */ @@ -145,7 +146,7 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * Loads specified {@link Project}. * * @param project - * @param freshStart + * @param freshStart * @param optional file name when loading from a file */ void loadProject(Project project, boolean freshStart, String filename); @@ -168,14 +169,14 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * @param fileName * @param isBackup */ - void saveProjectToFile(String fileName, boolean isBackup); - - /** - * Exports the current project into one or more files - one per layer and potentially drill layer. - * - * @param fileNameBase - * @param g2d - */ + void saveProjectToFile(String fileName, boolean isBackup); + + /** + * Exports the current project into one or more files - one per layer and potentially drill layer. + * + * @param fileNameBase + * @param g2d + */ void exportToGerber(String fileNameBase, Graphics2D g2d); /** @@ -210,9 +211,9 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * * @param g2d * @param drawOptions specific drawing options - * @param filter - * @param externalZoom - * @param scaleFactor + * @param filter + * @param externalZoom + * @param scaleFactor * @param visibleRect */ void draw(Graphics2D g2d, Set drawOptions, IComponentFilter filter, Double externalZoom, Double scaleFactor, Rectangle2D visibleRect); @@ -238,20 +239,20 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * * @return */ - VersionNumber getCurrentVersionNumber(); - - /** - * Returns few most recent versions. - * - * @return - */ + VersionNumber getCurrentVersionNumber(); + + /** + * Returns few most recent versions. + * + * @return + */ List getRecentUpdates(); /** * Adds a list of components to the project. * - * @param componentTransferable - * @param autoGroup + * @param componentTransferable + * @param autoGroup * @param assignNewNames */ void pasteComponents(ComponentTransferable componentTransferable, boolean autoGroup, boolean assignNewNames); @@ -317,8 +318,8 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * component. * * @param componentType - * @param template optional - * @param model optional datasheet model + * @param template optional + * @param model optional datasheet model * @param forceInstatiate */ void setNewComponentTypeSlot(ComponentType componentType, Template template, String[] model, boolean forceInstatiate); @@ -373,29 +374,29 @@ public interface IPlugInPort extends ISelectionProcessor, IMouseProcessor, IKeyP * * @param xAxisFirst */ - void renumberSelectedComponents(boolean xAxisFirst); - - /** - * @return size of extra space around the canvas - */ - double getExtraSpace(); - - /** - * Applies changes to the current project as specified by the provided {@link IProjectEditor}. - * - * @param editor - */ - void applyEditor(IProjectEditor editor); - - /** - * Locks or unlocks a single component. - */ - void lockComponent(IDIYComponent c, boolean locked); - - /** - * Checks for proximity between continuity areas and creates additional components around any problematic areas to visually identify them. - * - * @param threshold - */ + void renumberSelectedComponents(boolean xAxisFirst); + + /** + * @return size of extra space around the canvas + */ + double getExtraSpace(); + + /** + * Applies changes to the current project as specified by the provided {@link IProjectEditor}. + * + * @param editor + */ + void applyEditor(IProjectEditor editor); + + /** + * Locks or unlocks a single component. + */ + void lockComponent(IDIYComponent c, boolean locked); + + /** + * Checks for proximity between continuity areas and creates additional components around any problematic areas to visually identify them. + * + * @param threshold + */ List checkContinuityAreaProximity(Size threshold); } diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IProjectEditor.java b/diylc/diylc-core/src/main/java/org/diylc/common/IProjectEditor.java index 67d3b92d..45db5460 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IProjectEditor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IProjectEditor.java @@ -22,6 +22,7 @@ package org.diylc.common; import java.util.Set; + import org.diylc.core.IDIYComponent; import org.diylc.core.Project; diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/ISelectionProcessor.java b/diylc/diylc-core/src/main/java/org/diylc/common/ISelectionProcessor.java index e0a59b95..5a35c363 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/ISelectionProcessor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/ISelectionProcessor.java @@ -1,33 +1,34 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; -import java.awt.geom.Point2D; -import java.awt.geom.Rectangle2D; -import java.util.Collection; -import java.util.List; -import org.diylc.clipboard.ComponentTransferable; -import org.diylc.core.ExpansionMode; -import org.diylc.core.IDIYComponent; +import java.awt.geom.Point2D; +import java.awt.geom.Rectangle2D; +import java.util.Collection; +import java.util.List; + +import org.diylc.clipboard.ComponentTransferable; +import org.diylc.core.ExpansionMode; +import org.diylc.core.IDIYComponent; import org.diylc.core.measures.Size; public interface ISelectionProcessor { @@ -37,20 +38,20 @@ public interface ISelectionProcessor { * * @return */ - Collection> getSelectedComponents(); - - /** - * Returns selected component types - * - * @return - */ + Collection> getSelectedComponents(); + + /** + * Returns selected component types + * + * @return + */ Collection getSelectedComponentTypes(); /** * Updates the selection with the specified list of component. Also, updates control point map * with all components that are stuck to the newly selected components. * - * @param newSelection + * @param newSelection * @param panToSelection */ void setSelection(Collection> newSelection, boolean panToSelection); @@ -59,7 +60,7 @@ public interface ISelectionProcessor { * Finds all components at the specified location, sorted by z-index from top to bottom. Location * depends on the current zoom level. * - * @param point + * @param point * @param includeLocked * @return */ @@ -108,8 +109,8 @@ public interface ISelectionProcessor { /** * Returns the minimum rectangle containing all selected components, or null if none exists. * Rectangle is scaled by the current zoom level. - * - * @param applyZoom + * + * @param applyZoom * * @return */ @@ -122,36 +123,36 @@ public interface ISelectionProcessor { * @param yOffset * @param includeStuckComponents */ - void nudgeSelection(Size xOffset, Size yOffset, boolean includeStuckComponents); - - /** - * Selects components that match the criteria. - * - * @param criteria - */ - void selectMatching(String criteria); - - - /** - * Attempts to apply the specified model to all selected components. - * - * @param model - */ - void applyModelToSelection(String[] model); - - /** - * Sends each of the selected components one step back. - */ - void sendSelectionToBack(); - - /** - * Brings each of the selected components one step to front. - */ - void bringSelectionToFront(); - - /** - * Move selected components to z index starting from the provided value - * @param zIndex - */ + void nudgeSelection(Size xOffset, Size yOffset, boolean includeStuckComponents); + + /** + * Selects components that match the criteria. + * + * @param criteria + */ + void selectMatching(String criteria); + + + /** + * Attempts to apply the specified model to all selected components. + * + * @param model + */ + void applyModelToSelection(String[] model); + + /** + * Sends each of the selected components one step back. + */ + void sendSelectionToBack(); + + /** + * Brings each of the selected components one step to front. + */ + void bringSelectionToFront(); + + /** + * Move selected components to z index starting from the provided value + * @param zIndex + */ void moveSelectionToZIndex(int zIndex); } diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/ITask.java b/diylc/diylc-core/src/main/java/org/diylc/common/ITask.java index ecee4840..cce16f95 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/ITask.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/ITask.java @@ -1,24 +1,24 @@ -/* - - DIY Layout Creator (DIYLC). - Copyright (c) 2009-2018 held jointly by the individual authors. - - This file is part of DIYLC. - - DIYLC is free software: you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation, either version 3 of the License, or - (at your option) any later version. - - DIYLC is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with DIYLC. If not, see . - -*/ +/* + + DIY Layout Creator (DIYLC). + Copyright (c) 2009-2018 held jointly by the individual authors. + + This file is part of DIYLC. + + DIYLC is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + DIYLC is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with DIYLC. If not, see . + +*/ package org.diylc.common; /** diff --git a/diylc/diylc-core/src/main/java/org/diylc/common/IVariantProcessor.java b/diylc/diylc-core/src/main/java/org/diylc/common/IVariantProcessor.java index bdf3f312..900bf51d 100644 --- a/diylc/diylc-core/src/main/java/org/diylc/common/IVariantProcessor.java +++ b/diylc/diylc-core/src/main/java/org/diylc/common/IVariantProcessor.java @@ -19,37 +19,38 @@ along with DIYLC. If not, see . */ -package org.diylc.common; - +package org.diylc.common; + import java.io.IOException; import java.util.List; + import org.diylc.core.Template; - -public interface IVariantProcessor { - + +public interface IVariantProcessor { + public static final String TEMPLATES_KEY = "templates"; public static final String DEFAULT_TEMPLATES_KEY = "defaultTemplates"; - public static final String DEFAULT_TEMPLATES_IMPORT_DATE_KEY = "defaultTemplatesImportDate"; - - void saveSelectedComponentAsVariant(String variantName); - - List