/** * Add the supplied vector to this one. * * @param v * the vector to add * @return a vector holding the result */ public Vector4f add(Vector4fc v) { return add(v, thisOrNew()); }
/** * Add the supplied vector to this one. * * @param v * the vector to add * @return a vector holding the result */ public Vector4f add(Vector4fc v) { return add(v, thisOrNew()); }
/** * Increment the components of this vector by the given values. * * @param x * the x component to add * @param y * the y component to add * @param z * the z component to add * @param w * the w component to add * @return a vector holding the result */ public Vector4f add(float x, float y, float z, float w) { return add(x, y, z, w, thisOrNew()); }
/** * Increment the components of this vector by the given values. * * @param x * the x component to add * @param y * the y component to add * @param z * the z component to add * @param w * the w component to add * @return a vector holding the result */ public Vector4f add(float x, float y, float z, float w) { return add(x, y, z, w, thisOrNew()); }
/** * Used to apply theme only for component and not apply for child components. * * @param component component to apply theme. */ @Override public void apply(T component) { super.apply(component); component.getStyle().getBackground().setColor(settings.backgroundColor()); if (settings.shadowColor()== null || settings.shadowColor().length() > 0.00001f) { component.getStyle().setShadow(new Shadow(-4, 4, 17, -7, settings.shadowColor())); } else { component.getStyle().setShadow(null); } component.getHoveredStyle().getBackground() .setColor(settings.backgroundColor().mul(3).add(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())).div(4)); component.getPressedStyle().getBackground() .setColor(settings.backgroundColor().mul(2).add(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())).div(3)); component.getTextState().setTextColor(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())); } }
/** * Used to apply theme only for component and not apply for child components. * * @param component component to apply theme. */ @Override public void apply(T component) { super.apply(component); if (settings.shadowColor()== null || settings.shadowColor().length() > 0.00001f) { component.getStyle().setShadow(new Shadow(-4, 4, 17, -7, settings.shadowColor())); } else { component.getStyle().setShadow(null); } component.getFocusedStyle().getBackground() .setColor(settings.backgroundColor().mul(3).add(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())).div(4)); component.getTextState().setTextColor(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())); component.getTextState().setHorizontalAlign(HorizontalAlign.LEFT); component.getTextState().setHighlightColor(settings.strokeColor()); component.getStyle().getBackground().setColor(settings.backgroundColor()); } }
/** * Used to apply theme only for component and not apply for child components. * * @param component component to apply theme. */ @Override public void apply(T component) { super.apply(component); if (settings.shadowColor()== null || settings.shadowColor().length() > 0.00001f) { component.getStyle().setShadow(new Shadow(-4, 4, 17, -7, settings.shadowColor())); } else { component.getStyle().setShadow(null); } component.getFocusedStyle().getBackground() .setColor(settings.backgroundColor().mul(3).add(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())).div(4)); component.getTextState().setTextColor(ColorUtil.oppositeBlackOrWhite(settings.backgroundColor())); component.getTextState().setHorizontalAlign(HorizontalAlign.LEFT); component.getTextState().setHighlightColor(settings.strokeColor()); component.getStyle().getBackground().setColor(settings.backgroundColor()); } }
/** * Used to apply theme only for component and not apply for child components. * * @param component component to apply theme. */ @Override public void apply(T component) { super.apply(component); Vector4f bgc = ColorUtil.oppositeBlackOrWhite(settings.backgroundColor().mul(3)).add(settings.backgroundColor().mul(3)).div(4); component.getStyle().getBackground().setColor(bgc); if (settings.shadowColor()== null || settings.shadowColor().length() > 0.00001f) { component.getStyle().setShadow(new Shadow(-4, 4, 17, -7, settings.shadowColor())); } else { component.getStyle().setShadow(null); } Component viewport = component.getViewport(); Themes.getDefaultTheme().apply(viewport); Themes.getDefaultTheme().applyAll(component.getVerticalScrollBar()); Themes.getDefaultTheme().applyAll(component.getHorizontalScrollBar()); viewport.getStyle().getBackground().setColor(ColorConstants.transparent()); component.getStyle().setBorder(new SimpleLineBorder(settings.borderColor(), 1)); component.getViewport().getStyle().setBorder(new SimpleLineBorder(settings.borderColor(), 1)); }
/** * Used to apply theme only for component and not apply for child components. * * @param component component to apply theme. */ @Override public void apply(T component) { super.apply(component); Vector4f bgc = ColorUtil.oppositeBlackOrWhite(settings.backgroundColor().mul(3)).add(settings.backgroundColor().mul(3)).div(4); component.getStyle().getBackground().setColor(bgc); if (settings.shadowColor()== null || settings.shadowColor().length() > 0.00001f) { component.getStyle().setShadow(new Shadow(-4, 4, 17, -7, settings.shadowColor())); } else { component.getStyle().setShadow(null); } Component viewport = component.getViewport(); Themes.getDefaultTheme().apply(viewport); Themes.getDefaultTheme().applyAll(component.getVerticalScrollBar()); Themes.getDefaultTheme().applyAll(component.getHorizontalScrollBar()); viewport.getStyle().getBackground().setColor(ColorConstants.transparent()); component.getContainer().getStyle().getBackground().setColor(new Vector4f(bgc)); component.getStyle().setBorder(new SimpleLineBorder(settings.borderColor(), 1)); component.getViewport().getStyle().setBorder(new SimpleLineBorder(settings.borderColor(), 1)); }
minimizeButton.getHoveredStyle().getBackground().setColor(settings.allowColor().add(ColorUtil.oppositeBlackOrWhite(settings.allowColor())).div(2)); minimizeButton.getStyle().setBorder(null); minimizeButton.getTextState().setTextColor(ColorUtil.oppositeBlackOrWhite(settings.allowColor())); .setColor(settings.denyColor().add(ColorUtil.oppositeBlackOrWhite(settings.denyColor())).div(2)); component.getCloseButton().getStyle().setBorder(null); component.getCloseButton().getTextState().setTextColor(ColorUtil.oppositeBlackOrWhite(settings.denyColor()));