|
|
@ -16,11 +16,14 @@ import com.fr.design.gui.icombobox.LineComboBox; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.gui.ilable.UILabel; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayout; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
import com.fr.design.layout.TableLayoutHelper; |
|
|
|
|
|
|
|
import com.fr.design.mainframe.backgroundpane.BackgroundQuickPane; |
|
|
|
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; |
|
|
|
import com.fr.design.mainframe.backgroundpane.ColorBackgroundQuickPane; |
|
|
|
import com.fr.design.style.color.NewColorSelectBox; |
|
|
|
import com.fr.design.style.color.NewColorSelectBox; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.general.Background; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.Constants; |
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
import com.fr.stable.CoreConstants; |
|
|
|
|
|
|
|
import com.fr.stable.StringUtils; |
|
|
|
|
|
|
|
|
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.*; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
|
import javax.swing.event.ChangeEvent; |
|
|
@ -28,6 +31,7 @@ import javax.swing.event.ChangeListener; |
|
|
|
import java.awt.*; |
|
|
|
import java.awt.*; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.HashSet; |
|
|
|
|
|
|
|
import java.util.Set; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* @author zhou |
|
|
|
* @author zhou |
|
|
@ -37,6 +41,7 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse |
|
|
|
|
|
|
|
|
|
|
|
private static final String[] BORDERARRAY = {"currentLineCombo", "currentLineColorPane", "outerToggleButton", "topToggleButton", |
|
|
|
private static final String[] BORDERARRAY = {"currentLineCombo", "currentLineColorPane", "outerToggleButton", "topToggleButton", |
|
|
|
"leftToggleButton", "bottomToggleButton", "rightToggleButton", "innerToggleButton", "horizontalToggleButton", "verticalToggleButton"}; |
|
|
|
"leftToggleButton", "bottomToggleButton", "rightToggleButton", "innerToggleButton", "horizontalToggleButton", "verticalToggleButton"}; |
|
|
|
|
|
|
|
private static final Set<String> BORDER_SET = new HashSet<>(Arrays.asList(BORDERARRAY)); |
|
|
|
private boolean insideMode = false; |
|
|
|
private boolean insideMode = false; |
|
|
|
|
|
|
|
|
|
|
|
private UIToggleButton topToggleButton; |
|
|
|
private UIToggleButton topToggleButton; |
|
|
@ -193,25 +198,20 @@ public class BorderPane extends AbstractBasicStylePane implements GlobalNameObse |
|
|
|
this.verticalToggleButton.setEnabled(this.insideMode); |
|
|
|
this.verticalToggleButton.setEnabled(this.insideMode); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public Style update(Style style) { |
|
|
|
public Style update(Style style) { |
|
|
|
|
|
|
|
|
|
|
|
if (style == null) { |
|
|
|
if (style == null) { |
|
|
|
style = Style.DEFAULT_STYLE; |
|
|
|
style = Style.DEFAULT_STYLE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
CellBorderStyle cellBorderStyle = this.update(); |
|
|
|
if (backgroundPane.currentPane.isBackgroundChange()) { |
|
|
|
HashSet<String> borderSet = new HashSet<String>(Arrays.asList(BORDERARRAY)); |
|
|
|
style = style.deriveBackground(backgroundPane.update()); |
|
|
|
style = style.deriveBackground(backgroundPane.update()); |
|
|
|
} |
|
|
|
if (backgroundPane.currentPane != backgroundPane.paneList[1]){ |
|
|
|
if (BORDER_SET.contains(globalNameListener.getGlobalName())) { |
|
|
|
if (borderSet.contains(globalNameListener.getGlobalName())) { |
|
|
|
CellBorderStyle cellBorderStyle = this.update(); |
|
|
|
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), |
|
|
|
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), |
|
|
|
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); |
|
|
|
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); |
|
|
|
} |
|
|
|
|
|
|
|
}else { |
|
|
|
|
|
|
|
if (borderSet.contains(globalNameListener.getGlobalName()) && !((ColorBackgroundQuickPane) backgroundPane.currentPane).isBackGroundColor()){ |
|
|
|
|
|
|
|
style = style.deriveBorder(cellBorderStyle.getTopStyle(), cellBorderStyle.getTopColor(), cellBorderStyle.getBottomStyle(), cellBorderStyle.getBottomColor(), |
|
|
|
|
|
|
|
cellBorderStyle.getLeftStyle(), cellBorderStyle.getLeftColor(), cellBorderStyle.getRightStyle(), cellBorderStyle.getRightColor()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return style; |
|
|
|
return style; |
|
|
|