Updated colors and design
This commit is contained in:
18
pom.xml
18
pom.xml
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
<groupId>org.openautonomousconnection</groupId>
|
<groupId>org.openautonomousconnection</groupId>
|
||||||
<artifactId>OACSwing</artifactId>
|
<artifactId>OACSwing</artifactId>
|
||||||
<version>1.0.0-BETA.1.1</version>
|
<version>1.0.0-BETA.1.0</version>
|
||||||
<organization>
|
<organization>
|
||||||
<name>Open Autonomous Connection</name>
|
<name>Open Autonomous Connection</name>
|
||||||
<url>https://open-autonomous-connection.org/</url>
|
<url>https://open-autonomous-connection.org/</url>
|
||||||
@@ -53,22 +53,6 @@
|
|||||||
<name>Open Autonomous Public License (OAPL)</name>
|
<name>Open Autonomous Public License (OAPL)</name>
|
||||||
<url>https://open-autonomous-connection.org/license.html</url>
|
<url>https://open-autonomous-connection.org/license.html</url>
|
||||||
</license>
|
</license>
|
||||||
<license>
|
|
||||||
<name>GNU General Public License v3.0</name>
|
|
||||||
<url>https://www.gnu.org/licenses/gpl-3.0.html</url>
|
|
||||||
<comments>
|
|
||||||
Default license: Applies to all users and projects unless an explicit alternative license has been
|
|
||||||
granted.
|
|
||||||
</comments>
|
|
||||||
</license>
|
|
||||||
<license>
|
|
||||||
<name>projectlombok</name>
|
|
||||||
<url>https://github.com/projectlombok/lombok?tab=License-1-ov-file</url>
|
|
||||||
</license>
|
|
||||||
<license>
|
|
||||||
<name>Eclipse Public License v2.0</name>
|
|
||||||
<url>https://www.eclipse.org/legal/epl-2.0/</url>
|
|
||||||
</license>
|
|
||||||
</licenses>
|
</licenses>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
|||||||
@@ -0,0 +1,92 @@
|
|||||||
|
package org.openautonomousconnection.oacswing.component;
|
||||||
|
|
||||||
|
import lombok.NonNull;
|
||||||
|
import org.openautonomousconnection.oacswing.component.design.DesignManager;
|
||||||
|
import org.openautonomousconnection.oacswing.component.design.OACColor;
|
||||||
|
|
||||||
|
import javax.swing.*;
|
||||||
|
import java.awt.*;
|
||||||
|
|
||||||
|
public class OACDialog extends JDialog implements OACComponent {
|
||||||
|
public OACDialog() {
|
||||||
|
super();
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Frame owner) {
|
||||||
|
super(owner);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Frame owner, boolean modal) {
|
||||||
|
super(owner, modal);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Frame owner, String title) {
|
||||||
|
super(owner, title);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Frame owner, String title, boolean modal) {
|
||||||
|
super(owner, title, modal);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Dialog owner) {
|
||||||
|
super(owner);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Dialog owner, boolean modal) {
|
||||||
|
super(owner, modal);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Dialog owner, String title) {
|
||||||
|
super(owner, title);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
public OACDialog(Dialog owner, String title, boolean modal) {
|
||||||
|
super(owner, title, modal);
|
||||||
|
initDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initDialog() {
|
||||||
|
DesignManager.apply(this);
|
||||||
|
setBackground(OACColor.DARK_BACKGROUND.getColor());
|
||||||
|
getContentPane().setBackground(OACColor.DARK_BACKGROUND.getColor());
|
||||||
|
getContentPane().setForeground(OACColor.DARK_TEXT.getColor());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component add(Component comp) {
|
||||||
|
this.initOther(comp);
|
||||||
|
return super.add(comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component add(Component comp, int index) {
|
||||||
|
this.initOther(comp);
|
||||||
|
return super.add(comp, index);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(@NonNull Component comp, Object constraints) {
|
||||||
|
this.initOther(comp);
|
||||||
|
super.add(comp, constraints);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Component add(String name, Component comp) {
|
||||||
|
this.initOther(comp);
|
||||||
|
return super.add(name, comp);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void add(Component comp, Object constraints, int index) {
|
||||||
|
this.initOther(comp);
|
||||||
|
super.add(comp, constraints, index);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user