X-Git-Url: https://git.pterodactylus.net/?p=sonitus.git;a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fgui%2FComponentInfoPanel.java;h=a6b45d5e78be18e49e2d1391a444799346eabe2e;hp=cd0b9e248f99c505110f07f43a513f13b3c56cb0;hb=fa5196e029c48636f0c318311244395cfae49953;hpb=963ad1fcca51d8be2729e0dba4d6f46a69995679 diff --git a/src/main/java/net/pterodactylus/sonitus/gui/ComponentInfoPanel.java b/src/main/java/net/pterodactylus/sonitus/gui/ComponentInfoPanel.java index cd0b9e2..a6b45d5 100644 --- a/src/main/java/net/pterodactylus/sonitus/gui/ComponentInfoPanel.java +++ b/src/main/java/net/pterodactylus/sonitus/gui/ComponentInfoPanel.java @@ -27,7 +27,7 @@ import javax.swing.Box; import javax.swing.JLabel; import javax.swing.JPanel; -import net.pterodactylus.sonitus.data.Controlled; +import net.pterodactylus.sonitus.data.ControlledComponent; import net.pterodactylus.sonitus.data.Controller; import net.pterodactylus.sonitus.data.FormatMetadata; import net.pterodactylus.sonitus.data.controller.Fader; @@ -37,7 +37,7 @@ import net.pterodactylus.sonitus.data.controller.Switch; import com.google.common.base.Optional; /** - * Panel that shows information about a {@link Controlled} component. + * Panel that shows information about a {@link ControlledComponent}. * * @author David ‘Bombe’ Roden */ @@ -58,14 +58,14 @@ public class ComponentInfoPanel extends JPanel { /** * Creates a new component info panel. * - * @param controlled + * @param controlledComponent * The component to display */ - public ComponentInfoPanel(Controlled controlled) { + public ComponentInfoPanel(ControlledComponent controlledComponent) { super(new GridBagLayout()); setPreferredSize(new Dimension(400, 0)); - createPanel(controlled); + createPanel(controlledComponent); } // @@ -127,13 +127,13 @@ public class ComponentInfoPanel extends JPanel { /** * Creates the panel for the given controlled component. * - * @param controlled + * @param controlledComponent * The controlled component */ - private void createPanel(Controlled controlled) { + private void createPanel(ControlledComponent controlledComponent) { setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); - headerLabel.setText(controlled.name()); + headerLabel.setText(controlledComponent.name()); headerLabel.setFont(headerLabel.getFont().deriveFont(Font.BOLD)); int line = 0; @@ -146,7 +146,7 @@ public class ComponentInfoPanel extends JPanel { add(formatLabel, new GridBagConstraints(1, line++, 1, 1, 1.0, 0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(6, 6, 0, 0), 0, 0)); /* add the controllers. */ - for (Controller controller : controlled.controllers()) { + for (Controller controller : controlledComponent.controllers()) { add(new JLabel(controller.name()), new GridBagConstraints(0, line, 1, 1, 0.0, 0.0, GridBagConstraints.EAST, GridBagConstraints.NONE, new Insets(6, 0, 0, 6), 0, 0)); if (controller instanceof Fader) { add(new FaderPanel((Fader) controller), new GridBagConstraints(1, line++, 1, 1, 1.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.HORIZONTAL, new Insets(6, 0, 0, 0), 0, 0));