Added more default elements and changed colours

This commit is contained in:
Tinglyyy
2026-02-07 21:56:05 +01:00
parent c7fa63b769
commit 01f84a8053
45 changed files with 597 additions and 165 deletions

View File

@@ -1,7 +1,6 @@
package org.openautonomousconnection.oacswing.component;
import jdk.jshell.spi.ExecutionControl;
import org.jetbrains.annotations.Nullable;
import org.openautonomousconnection.oacswing.component.design.Design;
import org.openautonomousconnection.oacswing.component.design.DesignManager;
@@ -13,6 +12,7 @@ import java.util.OptionalInt;
public interface OACComponent {
default void initDesign() {
DesignManager.apply(this);
// Design design = DesignManager.getGlobalDesign();
//
// this.setBackground(design.getElements().get(this.getClass()).getColor());
@@ -25,7 +25,7 @@ public interface OACComponent {
component.initDesign();
}
default @Nullable Component add(Optional<String> name, Component comp, OptionalInt index, Optional<?> constrains) throws ExecutionControl.NotImplementedException {
default Component add(Optional<String> name, Component comp, OptionalInt index, Optional<?> constrains) throws ExecutionControl.NotImplementedException {
JComponent superclass = this.getSuperclass();
if(comp instanceof OACComponent component)