diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java b/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java index e663ccde4c3872b6b3cb56f820b16c05a56a03ae..1f4f60ee45e87e9a9d4b8b81ac8341cf9eccb17d 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/CyActivator.java @@ -3,6 +3,7 @@ package de.hhu.ba.yoshikoWrapper; import java.util.Properties; import org.cytoscape.application.CyApplicationManager; +import org.cytoscape.application.events.SetCurrentNetworkListener; import org.cytoscape.application.swing.CySwingApplication; import org.cytoscape.application.swing.CytoPanelComponent; import org.cytoscape.model.CyNetworkFactory; @@ -88,6 +89,7 @@ public class CyActivator extends AbstractCyActivator { registerService(context,netChangeListener, ColumnCreatedListener.class, new Properties()); registerService(context,netChangeListener, ColumnDeletedListener.class, new Properties()); registerService(context,netChangeListener, SessionLoadedListener.class, new Properties()); + registerService(context,netChangeListener, SetCurrentNetworkListener.class, new Properties()); } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/GraphicsLoader.java b/src/main/java/de/hhu/ba/yoshikoWrapper/core/GraphicsLoader.java new file mode 100644 index 0000000000000000000000000000000000000000..77ba43688d15d15d9e392309e909617954b2863d --- /dev/null +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/core/GraphicsLoader.java @@ -0,0 +1,22 @@ +package de.hhu.ba.yoshikoWrapper.core; + +import javax.swing.ImageIcon; + +public class GraphicsLoader { + private static ImageIcon yoshikoLogo; + private static ImageIcon yoshikoText; + + public static ImageIcon getLogo() { + if (yoshikoLogo == null) { + yoshikoLogo = new ImageIcon("/resources/graphics/YoshikoAlphaLogo.png"); + } + return yoshikoLogo; + } + + public static ImageIcon getText() { + if (yoshikoLogo == null) { + yoshikoLogo = new ImageIcon("/graphics/YoshikoAlphaText.png"); + } + return yoshikoText; + } +} diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java b/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java index cfb462082a4b7fb60208a41f2a16183889f3ecdd..49da3d04fe3ded97a69f4b3013a2aaecbe28ea9a 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/core/NetChangeListener.java @@ -1,5 +1,7 @@ package de.hhu.ba.yoshikoWrapper.core; +import org.cytoscape.application.events.SetCurrentNetworkEvent; +import org.cytoscape.application.events.SetCurrentNetworkListener; import org.cytoscape.model.events.AddedEdgesEvent; import org.cytoscape.model.events.AddedEdgesListener; import org.cytoscape.model.events.ColumnCreatedEvent; @@ -22,7 +24,8 @@ AddedEdgesListener, RemovedEdgesListener, ColumnCreatedListener, ColumnDeletedListener, -SessionLoadedListener +SessionLoadedListener, +SetCurrentNetworkListener { private ColumnMapper columnMapper; @@ -60,4 +63,9 @@ SessionLoadedListener columnMapper.updateValues(); } + @Override + public void handleEvent(SetCurrentNetworkEvent e) { + columnMapper.updateValues(); + } + } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ColumnMapper.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ColumnMapper.java index f87c73981536d8b1dc260540794c851a1268d658..7d1c83bddaabbf25312c5dc0b3bb45aa4e0d6b79 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ColumnMapper.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/ColumnMapper.java @@ -1,10 +1,9 @@ package de.hhu.ba.yoshikoWrapper.gui; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; +import java.awt.FlowLayout; + import javax.swing.BoxLayout; -import javax.swing.JButton; import javax.swing.JCheckBox; import javax.swing.JComboBox; @@ -18,43 +17,64 @@ public class ColumnMapper extends ComfortPanel{ //Swing components - private JComboBox<CyColumn> editingCostMapper; - private JComboBox<CyColumn> permanentMapper; - private JComboBox<CyColumn> forbiddenMapper; + private final JComboBox<CyColumn> editingCostMapper; + private final JComboBox<CyColumn> permanentMapper; + private final JComboBox<CyColumn> forbiddenMapper; - private JCheckBox useMappingCost; - private JCheckBox useMappingPerm; - private JCheckBox useMappingForb; - - private JButton updateColumns; + private final JCheckBox useMappingCost; + private final JCheckBox useMappingPerm; + private final JCheckBox useMappingForb; + private final ComfortPanel costGroup; + private final ComfortPanel permGroup; + private final ComfortPanel forbGroup; + public ColumnMapper() { this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //SWING COMPONENTS + + //Combo-Boxes that map to the CyColumns editingCostMapper = new JComboBox<CyColumn>(); permanentMapper = new JComboBox<CyColumn>(); forbiddenMapper = new JComboBox<CyColumn>(); + + //Should only be enabled if the option is checked + editingCostMapper.setEnabled(false); + permanentMapper.setEnabled(false); + forbiddenMapper.setEnabled(false); useMappingCost = new JCheckBox("Map modification costs"); useMappingPerm = new JCheckBox("Map edges as permanent"); useMappingForb = new JCheckBox("Map edges as forbidden"); - updateColumns = new JButton("Update Columns!"); + useMappingCost.addActionListener( + new EnableWhenSelectedListener(useMappingCost, editingCostMapper) + ); + useMappingPerm.addActionListener( + new EnableWhenSelectedListener(useMappingPerm, permanentMapper) + ); + useMappingForb.addActionListener( + new EnableWhenSelectedListener(useMappingForb, forbiddenMapper) + ); - this.addAll(useMappingCost,editingCostMapper,useMappingPerm,permanentMapper,useMappingForb,forbiddenMapper,updateColumns); - //Initial call to get table values - updateValues(); - //Add a focus listener to update values - updateColumns.addActionListener(new ActionListener() { + costGroup = new ComfortPanel(); + permGroup = new ComfortPanel(); + forbGroup = new ComfortPanel(); + + costGroup.setLayout(new FlowLayout()); + permGroup.setLayout(new FlowLayout()); + forbGroup.setLayout(new FlowLayout()); - @Override - public void actionPerformed(ActionEvent e) { - updateValues(); //shitty temporary solution - } - - }); + costGroup.addAll(useMappingCost,editingCostMapper); + permGroup.addAll(useMappingPerm,permanentMapper); + forbGroup.addAll(useMappingForb,forbiddenMapper); + + this.addAll(costGroup,permGroup,forbGroup); + + //Initial call to get table values + updateValues(); } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EditCostPanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EditCostPanel.java index aa6d26d38cb8ec3f208afdd289b52881e36baa7e..e8b6192f8d807f75b1c0a51f32a2de303b16c92f 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EditCostPanel.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EditCostPanel.java @@ -1,19 +1,26 @@ package de.hhu.ba.yoshikoWrapper.gui; +import java.awt.FlowLayout; + import javax.swing.BorderFactory; import javax.swing.BoxLayout; import javax.swing.JLabel; +import javax.swing.border.Border; import javax.swing.border.EtchedBorder; import org.cytoscape.model.CyColumn; +import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; + @SuppressWarnings("serial") //Will never be serialized public class EditCostPanel extends ComfortPanel { //SWING COMPONENTS private ColumnMapper columnMapper; + private DoubleInputField icField; private DoubleInputField dcField; + private JLabel icLabel; private JLabel dcLabel; @@ -25,23 +32,33 @@ public class EditCostPanel extends ComfortPanel { this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); //Initialize components columnMapper = new ColumnMapper(); + icField = new DoubleInputField(Double.NEGATIVE_INFINITY,0); dcField = new DoubleInputField(0,Double.POSITIVE_INFINITY); + icField.setText("-1.0"); + icField.setToolTipText(LocalizationManager.get("icTooltip")); dcField.setText("1.0"); - icLabel = new JLabel("Insertion Cost:"); - dcLabel = new JLabel("Deletion Cost:"); + + icLabel = new JLabel(LocalizationManager.get("defaultInsertion")); + dcLabel = new JLabel(LocalizationManager.get("defaultDeletion")); //Group the labels with their text fields groupIC = new ComfortPanel(); groupDC = new ComfortPanel(); + groupIC.setLayout(new FlowLayout()); + groupDC.setLayout(new FlowLayout()); + groupIC.addAll(icLabel,icField); groupDC.addAll(dcLabel,dcField); this.addAll(columnMapper,groupIC,groupDC); //Decoration/Visual - this.setBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED)); + Border border = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); + border = BorderFactory.createTitledBorder(border,LocalizationManager.get("editingCostPanel")); + + this.setBorder(border); } //SETTER / GETTER diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EnableWhenSelectedListener.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EnableWhenSelectedListener.java new file mode 100644 index 0000000000000000000000000000000000000000..1caa5265f9ab5bc4bc65e7d56ecf5e34779fa2c5 --- /dev/null +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/EnableWhenSelectedListener.java @@ -0,0 +1,30 @@ +package de.hhu.ba.yoshikoWrapper.gui; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.JCheckBox; +import javax.swing.JComponent; + + +public class EnableWhenSelectedListener implements ActionListener { + + private final JComponent component; + private final JCheckBox checkBox; + + public EnableWhenSelectedListener(JCheckBox cb, JComponent c) { + this.component = c; + this.checkBox = cb; + } + + @Override + public void actionPerformed(ActionEvent e) { + if (checkBox.isSelected()) { + component.setEnabled(true); + } + else { + component.setEnabled(false); + } + } + +} diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java index 059fca65205ee4eca9fead2fb9f89028841d0162..a328edf645d32b309e04551c182622e4b9a5e429 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/MainPanel.java @@ -1,16 +1,18 @@ package de.hhu.ba.yoshikoWrapper.gui; import java.awt.Component; +import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; +import java.util.ArrayList; +import java.util.Arrays; -import javax.swing.BoxLayout; -import javax.swing.ButtonGroup; import javax.swing.Icon; import javax.swing.JButton; import javax.swing.JCheckBox; +import javax.swing.JComponent; +import javax.swing.JLabel; import javax.swing.JOptionPane; -import javax.swing.JRadioButton; import org.cytoscape.application.swing.CytoPanelComponent; import org.cytoscape.application.swing.CytoPanelName; @@ -19,6 +21,7 @@ import org.cytoscape.work.TaskIterator; import de.hhu.ba.yoshikoWrapper.core.AlgorithmTask; import de.hhu.ba.yoshikoWrapper.core.CyCore; +import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; @@ -30,80 +33,100 @@ import de.hhu.ba.yoshikoWrapper.core.YoshikoLoader; public class MainPanel extends ComfortPanel implements CytoPanelComponent { //SWING COMPONENTS + + private final YoshikoHeader header; + + /** + * Swing is a bit special sometimes, so a panel is used to wrap the lang-switcher. + * This prevents stretching of the component + */ + private final ComfortPanel langSwitcherWrapper; private final LanguageSwitcher langSwitcher; private final LibraryPanel libraryPanel; private final EditCostPanel ecPanel; - private final ButtonGroup heuristicGroup; - private final JRadioButton useHeuristic; - private final JRadioButton useILP; - - private final TimeLimitSetter timeLimitSetter; private final ReductionRulesChooser reductionRulesChooser; + + private final OperationModePanel opModePanel; - private final JCheckBox useTriangleCutsBox; - private final JCheckBox usePartitionCutsBox; + private final JCheckBox showAdvancedOptions; - private final SolutionNumberChooser solutionNumberChooser; + private final ArrayList<JComponent> advancedOptions; /** * Main constructor, creates a new Panel and initializes subcomponents - * @param solPanel */ - public MainPanel( ) { + public MainPanel() { //SWING INIT - this.setLayout(new BoxLayout(this,BoxLayout.PAGE_AXIS)); + this.setLayout(new FlowLayout()); //Initialize Swing components + header = new YoshikoHeader(); + + langSwitcherWrapper = new ComfortPanel(); langSwitcher = new LanguageSwitcher(); + langSwitcherWrapper.addAll(new JLabel(LocalizationManager.get("switchLanguage")),langSwitcher); + langSwitcherWrapper.setLayout(new FlowLayout()); + libraryPanel = new LibraryPanel(); ecPanel = new EditCostPanel(); - heuristicGroup = new ButtonGroup(); - useILP = new JRadioButton("Use Integer Linear Programming"); - useILP.setSelected(true); - - useHeuristic = new JRadioButton("Use Heuristic"); - heuristicGroup.add(useILP); - heuristicGroup.add(useHeuristic); - - solutionNumberChooser = new SolutionNumberChooser(); + opModePanel = new OperationModePanel(); reductionRulesChooser = new ReductionRulesChooser(); - timeLimitSetter = new TimeLimitSetter(); - - useTriangleCutsBox = new JCheckBox("Use Triangle Cuts"); - usePartitionCutsBox = new JCheckBox("Use Partition Cuts"); - JButton runButton = new JButton("RUN"); runButton.addActionListener(buttonListener); - //Link time limit option to ILP - useILP.addActionListener(ilpHeuristicSwitch); - useHeuristic.addActionListener(ilpHeuristicSwitch); + + + showAdvancedOptions = new JCheckBox(LocalizationManager.get("showAdvanced")); + showAdvancedOptions.addActionListener(toggleAdvancedOptionsListener); this.addAll( - langSwitcher, + header, + langSwitcherWrapper, + showAdvancedOptions, libraryPanel, ecPanel, - useILP, - useHeuristic, - timeLimitSetter, reductionRulesChooser, - useTriangleCutsBox, - usePartitionCutsBox, - solutionNumberChooser, + opModePanel, runButton ); + advancedOptions = new ArrayList<JComponent>(); + //Manage all advanced components separately to enable toggling + advancedOptions.addAll( + Arrays.asList( + opModePanel, + reductionRulesChooser + ) + ); + + showAdvancedOptions(false); + this.setVisible(true); } + + private ActionListener toggleAdvancedOptionsListener = new ActionListener() { + + @Override + public void actionPerformed(ActionEvent e) { + showAdvancedOptions(showAdvancedOptions.isSelected()); + } + + }; + + private void showAdvancedOptions(boolean show) { + for (JComponent j : advancedOptions) { + j.setVisible(show); + } + } /** * ButtonListener for the "Run" Button @@ -116,7 +139,7 @@ public class MainPanel extends ComfortPanel implements CytoPanelComponent { if (YoshikoLoader.isLibraryLoaded()){ AbstractTask yoshiko = new AlgorithmTask( CyCore.cy.getCurrentNetwork(), - timeLimitSetter.getTimeLimit(), + opModePanel.getTimeLimit(), ecPanel.getWeightColumn(), ecPanel.getPermanentColumn(), ecPanel.getForbiddenColumn(), @@ -124,41 +147,25 @@ public class MainPanel extends ComfortPanel implements CytoPanelComponent { ecPanel.getDefaultDeletionCost(), reductionRulesChooser.getBitMask(), reductionRulesChooser.getMultFactor(), - useTriangleCutsBox.isSelected(), - usePartitionCutsBox.isSelected(), - useHeuristic.isSelected(), - solutionNumberChooser.getSolCount() + opModePanel.useTriangleCuts(), + opModePanel.usePartitionCuts(), + opModePanel.useHeuristic(), + opModePanel.getSolCount() ); CyCore.dialogTaskManager.execute(new TaskIterator(1,yoshiko)); } else { - JOptionPane.showMessageDialog( - - null, - LocalizationManager.get("noLibTitle"), - LocalizationManager.get("noLibMessage"), - JOptionPane.ERROR_MESSAGE - ); + JOptionPane.showMessageDialog( + null, + LocalizationManager.get("noLibTitle"), + LocalizationManager.get("noLibMessage"), + JOptionPane.ERROR_MESSAGE + ); } } }; - ActionListener ilpHeuristicSwitch = new ActionListener() { - @Override - public void actionPerformed(ActionEvent e) { - if (useILP.isSelected()) { - timeLimitSetter.setEnabled(true); - } - else { - timeLimitSetter.setEnabled(false); - } - } - }; - - public ColumnMapper getColumnMapper() { - return ecPanel.getColumnMapper(); - } - + //GETTER / SETTER @@ -178,11 +185,13 @@ public class MainPanel extends ComfortPanel implements CytoPanelComponent { //TODO: Be creative I guess return "Yoshiko"; } - - + + public ColumnMapper getColumnMapper() { + return ecPanel.getColumnMapper(); + } + public Icon getIcon() { - //TODO: - return null; + return GraphicsLoader.getLogo(); } diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/OperationModePanel.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/OperationModePanel.java new file mode 100644 index 0000000000000000000000000000000000000000..133db243b212bfc3f7c40d4b289c9add259cd0a3 --- /dev/null +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/OperationModePanel.java @@ -0,0 +1,98 @@ +package de.hhu.ba.yoshikoWrapper.gui; + +import java.awt.event.ActionEvent; +import java.awt.event.ActionListener; + +import javax.swing.BorderFactory; +import javax.swing.BoxLayout; +import javax.swing.ButtonGroup; +import javax.swing.JCheckBox; +import javax.swing.JRadioButton; +import javax.swing.border.Border; +import javax.swing.border.EtchedBorder; + +import de.hhu.ba.yoshikoWrapper.core.LocalizationManager; + +@SuppressWarnings("serial") +public class OperationModePanel extends ComfortPanel{ + private final JRadioButton useHeuristic; + private final JRadioButton useILP; + private final TimeLimitSetter timeLimitSetter; + private final SolutionNumberChooser solutionNumberChooser; + private final JCheckBox useTriangleCutsBox; + private final JCheckBox usePartitionCutsBox; + + private final ButtonGroup heuristicGroup; + + public OperationModePanel() { + + this.setLayout(new BoxLayout(this,BoxLayout.Y_AXIS)); + + heuristicGroup = new ButtonGroup(); + useILP = new JRadioButton("Use Integer Linear Programming"); + useILP.setSelected(true); + + useHeuristic = new JRadioButton("Use Heuristic"); + heuristicGroup.add(useILP); + heuristicGroup.add(useHeuristic); + + solutionNumberChooser = new SolutionNumberChooser(); + + + timeLimitSetter = new TimeLimitSetter(); + + useTriangleCutsBox = new JCheckBox("Use Triangle Cuts"); + usePartitionCutsBox = new JCheckBox("Use Partition Cuts"); + + //Link time limit option to ILP + useILP.addActionListener(ilpHeuristicSwitch); + useHeuristic.addActionListener(ilpHeuristicSwitch); + + + this.addAll(useILP,useHeuristic,solutionNumberChooser,timeLimitSetter,useTriangleCutsBox,usePartitionCutsBox); + + Border border = BorderFactory.createEtchedBorder(EtchedBorder.LOWERED); + border = BorderFactory.createTitledBorder(border,LocalizationManager.get("operationMode")); + this.setBorder(border); + } + + ActionListener ilpHeuristicSwitch = new ActionListener() { + @Override + public void actionPerformed(ActionEvent e) { + if (useILP.isSelected()) { + timeLimitSetter.setEnabled(true); + useTriangleCutsBox.setEnabled(true); + usePartitionCutsBox.setEnabled(true); + solutionNumberChooser.setEnabled(true); + } + else { + timeLimitSetter.setEnabled(false); + useTriangleCutsBox.setEnabled(false); + usePartitionCutsBox.setEnabled(false); + solutionNumberChooser.setEnabled(false); + } + } + }; + + //SETTER GETTER + + public int getTimeLimit() { + return timeLimitSetter.getTimeLimit(); + } + + public boolean useTriangleCuts() { + return useTriangleCutsBox.isSelected(); + } + + public boolean usePartitionCuts() { + return usePartitionCutsBox.isSelected(); + } + + public boolean useHeuristic() { + return useHeuristic.isSelected(); + } + + public int getSolCount() { + return solutionNumberChooser.getSolCount(); + } +} diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionNumberChooser.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionNumberChooser.java index dc904808a770a789bf80f6540bc29ffcf327ef5d..c75006a6b83624d9129fd818e972093220912db7 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionNumberChooser.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/SolutionNumberChooser.java @@ -16,8 +16,12 @@ public class SolutionNumberChooser extends ComfortPanel { numSolutionsSetter = new JSpinner(); numSolutionsSetter.setModel(new SpinnerNumberModel(1,1,Integer.MAX_VALUE,1)); label = new JLabel(LocalizationManager.get("nrSolutions")); - this.addAll(label, numSolutionsSetter); - + this.addAll(label, numSolutionsSetter); + } + + @Override + public void setEnabled(boolean enabled) { + numSolutionsSetter.setEnabled(enabled); } public int getSolCount() { diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/TimeLimitSetter.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/TimeLimitSetter.java index 993afbbaf2a2e5576e0aba7b9f6a6a34a9131e0a..abb2ea29319e33162acc2f57c6d16e832c3715e6 100644 --- a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/TimeLimitSetter.java +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/TimeLimitSetter.java @@ -32,6 +32,7 @@ public class TimeLimitSetter extends ComfortPanel{ this.addAll(checkBox,numberField); } + @Override public void setEnabled(boolean enabled) { if (enabled) { this.checkBox.setEnabled(enabled); diff --git a/src/main/java/de/hhu/ba/yoshikoWrapper/gui/YoshikoHeader.java b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/YoshikoHeader.java new file mode 100644 index 0000000000000000000000000000000000000000..220ddcfa05e0a3ed8a56d1402517680d7d470f36 --- /dev/null +++ b/src/main/java/de/hhu/ba/yoshikoWrapper/gui/YoshikoHeader.java @@ -0,0 +1,24 @@ +package de.hhu.ba.yoshikoWrapper.gui; + + +import javax.swing.BoxLayout; +import javax.swing.JLabel; + +import de.hhu.ba.yoshikoWrapper.core.GraphicsLoader; + +@SuppressWarnings("serial") +public class YoshikoHeader extends ComfortPanel { + + private JLabel logo; + private JLabel text; + + public YoshikoHeader() { + this.setLayout(new BoxLayout(this,BoxLayout.X_AXIS)); + + logo = new JLabel(GraphicsLoader.getLogo()); + text = new JLabel(GraphicsLoader.getText()); + + this.addAll(logo,text); + + } +} diff --git a/src/main/resources/YoshikoStrings.properties b/src/main/resources/YoshikoStrings.properties index d443a6a175fad86114ee844cd199eeaca012a008..bf621de17807e7de115c41874326f76c66022de3 100644 --- a/src/main/resources/YoshikoStrings.properties +++ b/src/main/resources/YoshikoStrings.properties @@ -21,4 +21,11 @@ nrSolutions = Number of Solutions: redRuleChooserTitle = Reduction Rules discardSolution = Discard createMetaGraph = Create Meta-Graph -metaGraph = Meta Graph \ No newline at end of file +metaGraph = Meta Graph +showAdvanced = Show advanced options +editingCostPanel = Editing Costs +defaultInsertion = Default insertion cost: +defaultDeletion = Default deletion cost: +switchLanguage = Plugin language: +icTooltip = This value is used to determine what the algorithm pays when inserting an edge. Existing mappings overwrite this value. A higher value means that the algorithm is less likely to insert edges in order to generate a cluster. +operationMode = Operation Mode \ No newline at end of file diff --git a/src/main/resources/graphics/YoshikoAlphaLogo.png b/src/main/resources/graphics/YoshikoAlphaLogo.png new file mode 100644 index 0000000000000000000000000000000000000000..526809e194d1b5ba94fe2c78c0f0d884d409d30d Binary files /dev/null and b/src/main/resources/graphics/YoshikoAlphaLogo.png differ diff --git a/src/main/resources/graphics/YoshikoAlphaText.png b/src/main/resources/graphics/YoshikoAlphaText.png new file mode 100644 index 0000000000000000000000000000000000000000..eafac8c6726b9433584f17cc41eb11290e4cf5a0 Binary files /dev/null and b/src/main/resources/graphics/YoshikoAlphaText.png differ diff --git a/src/main/resources/graphics/package-info.java b/src/main/resources/graphics/package-info.java new file mode 100644 index 0000000000000000000000000000000000000000..0a04afdd37e91f106a5d8050957cc42c77e819e0 --- /dev/null +++ b/src/main/resources/graphics/package-info.java @@ -0,0 +1 @@ +package graphics; \ No newline at end of file