use of com.github.weisj.darklaf.util.Alignment in project darklaf by weisJ.
the class PanelPopup method setAlignment.
@Override
public void setAlignment(final Alignment alignment) {
if (alignment == null || this.alignment == Alignment.CENTER) {
throw new IllegalArgumentException("Illegal alignment: " + (alignment != null ? alignment.toString() : "null"));
}
Alignment old = this.alignment;
this.alignment = alignment;
firePropertyChange(KEY_ALIGNMENT, old, alignment);
}
use of com.github.weisj.darklaf.util.Alignment in project darklaf by weisJ.
the class ToolTipContext method getContentSize.
private Dimension getContentSize() {
Dimension dim = toolTip.getPreferredSize();
Alignment align = alignment == Alignment.CENTER ? centerAlignment : alignment;
Border border = toolTip.getBorder();
if (border instanceof AlignableTooltipBorder) {
((AlignableTooltipBorder) border).adjustContentSize(toolTip, dim, align);
}
return dim;
}
use of com.github.weisj.darklaf.util.Alignment in project darklaf by weisJ.
the class TabFrameTabContainer method setOrientation.
@Override
public void setOrientation(final Alignment a) {
if (this.orientation == a)
return;
Alignment oldOrientation = this.orientation;
this.orientation = a;
firePropertyChange(KEY_ORIENTATION, oldOrientation, orientation);
}
use of com.github.weisj.darklaf.util.Alignment in project darklaf by weisJ.
the class TabFrameTabLabel method setOrientation.
@Override
public void setOrientation(final Alignment a) {
if (this.orientation == a)
return;
Alignment oldOrientation = this.orientation;
this.orientation = a;
firePropertyChange(KEY_ORIENTATION, oldOrientation, orientation);
}
use of com.github.weisj.darklaf.util.Alignment in project darklaf by weisJ.
the class DarkTooltipBorder method adjustInsets.
private void adjustInsets(final Insets si) {
Alignment align = bubbleBorder.getPointerSide();
int pointerSize = bubbleBorder.getPointerSize();
if (align.isSouth()) {
si.bottom -= pointerSize;
} else if (align == Alignment.EAST) {
si.right -= pointerSize;
} else if (align == Alignment.WEST) {
si.left -= pointerSize;
} else if (align.isNorth()) {
si.top -= pointerSize;
}
}
Aggregations