mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
improved color editor
This commit is contained in:
+10
@@ -37,4 +37,14 @@ public class ColorEditor extends JLabel {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBackground(Color bg) {
|
||||
if (bg.getRed() < 127 || bg.getBlue() < 127 || bg.getGreen() < 127) {
|
||||
setForeground(Color.white);
|
||||
} else {
|
||||
setForeground(Color.black);
|
||||
}
|
||||
super.setBackground(bg);
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -331,7 +331,7 @@ public class Presenter implements IPlugInPort {
|
||||
|
||||
@Override
|
||||
public void injectGUIComponent(JComponent component, int position) throws BadPositionException {
|
||||
LOG.info(String.format("injectGUIComponent(%s, %s)", component.toString(), position));
|
||||
LOG.info(String.format("injectGUIComponent(%s, %s)", component.getClass().getName(), position));
|
||||
view.addComponent(component, position);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user