Updated colors and design
This commit is contained in:
@@ -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