Skip to content

Commit

Permalink
Make UI utils applicable to a wider range of targets
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Avtonomov authored and fcyu committed Dec 8, 2022
1 parent 5cada68 commit a2a351f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions MSFragger-GUI/src/com/github/chhh/utils/swing/MigUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
package com.github.chhh.utils.swing;

import com.github.chhh.utils.swing.FormEntry.Builder;
import java.awt.Color;

import java.awt.*;
import javax.swing.JComponent;
import javax.swing.JPanel;
import javax.swing.border.Border;
Expand Down Expand Up @@ -122,18 +123,18 @@ public LC lcNoInsetsTopBottom() {
return new LC().insets("0px", null, "0px", null);
}

public CC add(JComponent host, JComponent child) {
public CC add(JComponent host, Component child) {
CC cc = ccL();
host.add(child, cc);
return cc;
}

public CC add(JComponent host, JComponent child, CC cc) {
public CC add(JComponent host, Component child, CC cc) {
host.add(child, cc);
return cc;
}

public CC add(JComponent host, JComponent child, boolean isAlignLeft) {
public CC add(JComponent host, Component child, boolean isAlignLeft) {
CC cc = isAlignLeft ? ccL() : ccR();
host.add(child, cc);
return cc;
Expand Down

0 comments on commit a2a351f

Please sign in to comment.