Search in sources :

Example 11 with Alignment

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);
}
Also used : Alignment(com.github.weisj.darklaf.util.Alignment)

Example 12 with 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;
}
Also used : AlignableTooltipBorder(com.github.weisj.darklaf.ui.tooltip.AlignableTooltipBorder) Alignment(com.github.weisj.darklaf.util.Alignment) AlignableTooltipBorder(com.github.weisj.darklaf.ui.tooltip.AlignableTooltipBorder) Border(javax.swing.border.Border)

Example 13 with Alignment

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);
}
Also used : Alignment(com.github.weisj.darklaf.util.Alignment)

Example 14 with Alignment

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);
}
Also used : Alignment(com.github.weisj.darklaf.util.Alignment)

Example 15 with Alignment

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;
    }
}
Also used : Alignment(com.github.weisj.darklaf.util.Alignment)

Aggregations

Alignment (com.github.weisj.darklaf.util.Alignment)26 JTabFrame (com.github.weisj.darklaf.components.tabframe.JTabFrame)6 TabFrameUI (com.github.weisj.darklaf.components.tabframe.TabFrameUI)3 ToolTipContext (com.github.weisj.darklaf.components.tooltip.ToolTipContext)2 DemoPanel (com.github.weisj.darklaf.ui.DemoPanel)2 OverlayScrollPane (com.github.weisj.darklaf.components.OverlayScrollPane)1 AlignmentStrategy (com.github.weisj.darklaf.components.alignment.AlignmentStrategy)1 TabFrameTab (com.github.weisj.darklaf.components.tabframe.TabFrameTab)1 TabbedPopup (com.github.weisj.darklaf.components.tabframe.TabbedPopup)1 ToolTipStyle (com.github.weisj.darklaf.components.tooltip.ToolTipStyle)1 DarkSVGIcon (com.github.weisj.darklaf.properties.icons.DarkSVGIcon)1 RotatableIcon (com.github.weisj.darklaf.properties.icons.RotatableIcon)1 DemoResources (com.github.weisj.darklaf.ui.DemoResources)1 BaseComponentDemo (com.github.weisj.darklaf.ui.demo.BaseComponentDemo)1 DemoExecutor (com.github.weisj.darklaf.ui.demo.DemoExecutor)1 AlignableTooltipBorder (com.github.weisj.darklaf.ui.tooltip.AlignableTooltipBorder)1 DarkToolTipUI (com.github.weisj.darklaf.ui.tooltip.DarkToolTipUI)1 Pair (com.github.weisj.darklaf.util.Pair)1 StringUtil (com.github.weisj.darklaf.util.StringUtil)1 UnsupportedFlavorException (java.awt.datatransfer.UnsupportedFlavorException)1