congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
PgsLookAndFeel
Code IndexAdd Tabnine to your IDE (free)

How to use
PgsLookAndFeel
in
com.pagosoft.plaf

Best Java code snippets using com.pagosoft.plaf.PgsLookAndFeel (Showing top 20 results out of 315)

origin: com.github.arnabk/pgslookandfeel

public static void setCurrentTheme(MetalTheme t) {
  PgsLookAndFeel.setCurrentTheme(t);
}
origin: com.github.arnabk/pgslookandfeel

public static void drawVerticalBumps(Graphics g, int x, int y, int height) {
  int loops = height / 6;
  for (int i = 0; i < loops; i++) {
    g.setColor(PgsLookAndFeel.getControlShadow());
    g.fillRect(x, y + (i * 6), 2, 2);
    g.fillRect(x + 3, 3 + y + (i * 6), 2, 2);
    g.setColor(ColorUtils.getTranslucentColor(PgsLookAndFeel.getControl(), 180));
    g.fillRect(x + 1, 1 + y + (i * 6), 2, 2);
    g.fillRect(x + 4, 4 + y + (i * 6), 2, 2);
  }
}
origin: com.github.arnabk/pgslookandfeel

  public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
    super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
    if(column == table.getColumnCount()) {
      setBorder(new PgsBorders.Generic(new Insets(0, 0, 1, 0), PgsLookAndFeel.getControlDarkShadow()));
    } else {
      setBorder(new PgsBorders.Generic(new Insets(0, 0, 1, 1), PgsLookAndFeel.getControlDarkShadow()));
    }
    setBackground(PgsLookAndFeel.getControl());
    return this;
  }
}
origin: com.github.arnabk/pgslookandfeel

public void paintIcon(Component component, Graphics g, int x, int y) {
  JButton c = (JButton) component;
  int iconWidth = getIconWidth();
  g.translate(x, y);
  g.setColor(c.isEnabled() ? PgsLookAndFeel.getControlInfo() : PgsLookAndFeel.getControlShadow());
  if (iconPaintPressed) {
    g.drawLine(1, 3, 1 + iconWidth - 3, 3);
    g.drawLine(2, 2, 2 + iconWidth - 5, 2);
    g.drawLine(3, 1, 3 + iconWidth - 7, 1);
    g.drawLine(4, 0, 4 + iconWidth - 9, 0);
  } else {
    g.drawLine(1, 1, 1 + (iconWidth - 3), 1);
    g.drawLine(2, 2, 2 + (iconWidth - 5), 2);
    g.drawLine(3, 3, 3 + (iconWidth - 7), 3);
    g.drawLine(4, 4, 4 + (iconWidth - 9), 4);
  }
  g.translate(-x, -y);
}
origin: com.github.arnabk/pgslookandfeel

if (model.isEnabled()) {
  gfx.setColor(PgsLookAndFeel.getControlHighlight());
  gfx.fillOval(x, y, controlSize, controlSize);
  if (model.isRollover()) {
    gfx.setColor(PgsLookAndFeel.getGlow());
    gfx.drawOval(x + 1, y + 1, controlSize - 3, controlSize - 3);
  gfx.setColor(PgsLookAndFeel.getControlDarkShadow());
  gfx.drawOval(x, y, controlSize - 1, controlSize - 1);
  if (model.isPressed() && model.isArmed()) {
    gfx.setColor(PgsLookAndFeel.getControlShadow());
    gfx.fillOval(x + 1, y + 1, controlSize - 2, controlSize - 2);
  gfx.setColor(PgsLookAndFeel.getControlInfo());
} else {
  gfx.setColor(PgsLookAndFeel.getControlShadow());
  gfx.drawOval(x, y, controlSize - 1, controlSize - 1);
  if(model.isEnabled()) {
    gfx.setColor(PgsLookAndFeel.getPrimaryControlDarkShadow());
  } else {
  gfx.setColor(
      model.isEnabled() ? PgsLookAndFeel.getPrimaryControlDarkShadow()
          : PgsLookAndFeel.getControlShadow());
origin: com.github.arnabk/pgslookandfeel

  g.setColor(PgsLookAndFeel.getControlHighlight());
  g.fillRect(x, y, controlSize, controlSize);
  if (model.isRollover()) {
    g.setColor(PgsLookAndFeel.getPrimaryControl());
    g.drawRect(x + 1, y + 1, controlSize - 3, controlSize - 3);
  g.setColor(PgsLookAndFeel.getControlDarkShadow());
  g.drawRect(x, y, controlSize - 1, controlSize - 1);
  if (model.isPressed() && model.isArmed()) {
    g.setColor(PgsLookAndFeel.getControlShadow());
    g.fillRect(x + 1, y + 1, controlSize - 2, controlSize - 2);
  g.setColor(PgsLookAndFeel.getControlInfo());
} else {
  g.setColor(PgsLookAndFeel.getControlShadow());
  g.drawRect(x, y, controlSize - 1, controlSize - 1);
      model.isEnabled() ? PgsLookAndFeel.getPrimaryControlDarkShadow()
          : PgsLookAndFeel.getControlShadow());
  drawCheck(c, g, x, y);
origin: com.github.arnabk/pgslookandfeel

PlafOptions.useShadowBorder(getPropertyBoolValue(props, "pgs.shadowBorder", "false"));
PlafOptions.useBoldFonts(getPropertyBoolValue(props, "swing.boldMetal", "false"));
PlafOptions.useBoldMenuFonts(getPropertyBoolValue(props, "pgs.boldMenuFonts", "false"));
PlafOptions.useExtraMargin(getPropertyBoolValue(props, "pgs.extraMargin", "true"));
PlafOptions.useDisabledIcon(getPropertyBoolValue(props, "pgs.useDisabledIcon", "true"));
PlafOptions.useToolBarIcon(getPropertyBoolValue(props, "pgs.useToolBarIcon", "true"));
PlafOptions.setAntialiasingEnabled(getPropertyBoolValue(props, "pgs.aaEnabled", "false"));
PlafOptions.setClearBorderEnabled(getPropertyBoolValue(props, "pgs.clearBorderEnabled", "false"));
PlafOptions.setFixHtmlDisplayEnabled(getPropertyBoolValue(props, "pgs.fixHtmlDisplayEnabled", "true"));
PlafOptions.setWheelTabbedPaneEnabled(getPropertyBoolValue(props, "pgs.wheelTabEnabled", "true"));
PlafOptions.setTabbedPaneRightClickSelectionEnabled(getPropertyBoolValue(props, "pgs.tabbedPaneRightClickSelectionEnabled", "false"));
PlafOptions.setTabReorderingEnabled(getPropertyBoolValue(props, "pgs.tabReorderingEnabled", "false"));
PlafOptions.setPaintRolloverButtonBorder(getPropertyBoolValue(props, "pgs.paintRolloverButtonBorder", "true"));
PlafOptions.setOfficeScrollBarEnabled(getPropertyBoolValue(props, "pgs.officeScrollBarEnabled", "false"));
PlafOptions.setVistaStyle(getPropertyBoolValue(props, "pgs.vistaStyle", "false"));
PlafOptions.setStyle(PlafOptions.MENUBAR, getPropertyStyleValue(props, "pgs.style.menuBar", "flat"));
PlafOptions.setStyle(PlafOptions.MENU_ITEM, getPropertyStyleValue(props, "pgs.style.menuitem", "flat"));
PlafOptions.setStyle(
    PlafOptions.MENUBARMENU, getPropertyStyleValue(props, "pgs.style.menuBarMenu", "flat"));
PlafOptions
    .setStyle(PlafOptions.TOOLBAR, getPropertyStyleValue(props, "pgs.style.toolBar", "gradient"));
PlafOptions.setStyle(
    PlafOptions.TOOLBARBUTTON, getPropertyStyleValue(props, "pgs.style.toolBarButton", "gradient"));
PlafOptions.setStyle(PlafOptions.BUTTON, getPropertyStyleValue(props, "pgs.style.button", "gradient"));
  setCurrentTheme(theme);
} else {
  logger.warning("Could not create theme from pgs.properties");
origin: com.github.arnabk/pgslookandfeel

    ? PgsLookAndFeel.getPrimaryControlDarkShadow()
    : PgsLookAndFeel.getControlDisabled();
int width = getWidth();
int height = getHeight();
    s = gfx.getStroke();
    gfx.setStroke(new BasicStroke(2.4f, BasicStroke.CAP_SQUARE, BasicStroke.JOIN_MITER));
    g.setColor(PgsLookAndFeel.getGlow());
    if (getDirection() == NORTH) {
      g.drawRect(2, 1, width - 3, height - 3);
g.setColor(isEnabled ? shadowColor : PgsLookAndFeel.getControlShadow());
origin: com.github.arnabk/pgslookandfeel

MetalTheme theme = getCurrentTheme();
    "ScrollPane.border", BorderFactory.createLineBorder(PgsLookAndFeel.getControlDarkShadow(), 1),
    "TabbedPane.background", PgsLookAndFeel.getControlShadow(),
    "SplitPane.border", null,
    "SplitPaneDivider.border", null,
    "OptionPane.errorIcon", makeIcon(getClass(), "icons/Error.png"),
    "OptionPane.informationIcon", makeIcon(getClass(), "icons/Inform.png"),
    "OptionPane.warningIcon", makeIcon(getClass(), "icons/Warn.png"),
    "OptionPane.questionIcon", makeIcon(getClass(), "icons/Question.png"),
    "FileView.computerIcon", makeIcon(getClass(), "icons/Computer.png"),
    "FileView.directoryIcon", makeIcon(getClass(), "icons/TreeClosed.png"),
    "FileView.fileIcon", makeIcon(getClass(), "icons/File.png"),
    "FileView.floppyDriveIcon", makeIcon(getClass(), "icons/FloppyDrive.png"),
    "FileView.hardDriveIcon", makeIcon(getClass(), "icons/HardDrive.png"),
    "FileChooser.homeFolderIcon", makeIcon(getClass(), "icons/HomeFolder.png"),
    "FileChooser.newFolderIcon", makeIcon(getClass(), "icons/NewFolder.png"),
    "FileChooser.upFolderIcon", makeIcon(getClass(), "icons/UpFolder.png"),
    "Tree.closedIcon", makeIcon(getClass(), "icons/TreeClosed.png"),
    "Tree.openIcon", makeIcon(getClass(), "icons/TreeOpen.png"),
    "Tree.leafIcon", makeIcon(getClass(), "icons/TreeLeaf.png")
};
table.putDefaults(uiDefaults);
origin: com.github.arnabk/pgslookandfeel

public void paintBorder(Component c, Graphics g, int x, int y, int w, int h) {
  if (c.isEnabled()) {
    //PgsUtils.drawButtonBorder(g, x, y, w, h);
    boolean isEditable = (c instanceof JTextComponent && ((JTextComponent)c).isEditable()) || (c instanceof JComboBox && ((JComboBox)c).isEditable());
    boolean hasFocus = c.hasFocus();
    if(c instanceof JComboBox) {
      JComboBox comboBox = ((JComboBox) c);
      hasFocus = comboBox.isEditable() && comboBox.getEditor().getEditorComponent().hasFocus();
    }
    PgsUtils.drawButtonBorder(g, x, y, w - 1, h - 1, 2, 2, hasFocus && isEditable ? PgsLookAndFeel.getPrimaryControlDarkShadow() : PgsLookAndFeel.getControlDarkShadow());
  } else {
    PgsUtils.drawDisabledBorder(g, x, y, w - 1, h - 1, 2, 2);
  }
}
origin: com.github.arnabk/pgslookandfeel

public static void drawButtonBorder(Graphics g, int x, int y, int w, int h) {
  clearButtonBorder(g, x, y, w, h);
  drawButtonBorder(g, x, y, w - 1, h - 1, PgsLookAndFeel.getControlDarkShadow());
}
origin: com.github.arnabk/pgslookandfeel

public static void drawRolloverButtonBorder(Graphics g, int x, int y, int w, int h) {
  if (UIManager.getBoolean("Button.rolloverVistaStyle")) {
    drawButtonBorder(g, x, y, w - 1, h - 1, PgsLookAndFeel.getGlow());
  } else {
    drawButtonBorder(g, x + 1, y + 1, w - 3, h - 3, rolloverBorderStroke, PgsLookAndFeel.getGlow());
    PgsUtils.drawButtonBorder(g, x, y, w, h);
  }
}
origin: com.github.arnabk/pgslookandfeel

public static void drawDisabledBorder(Graphics g, int x, int y, int w, int h, int c1, int c2) {
  clearButtonBorder(g, x, y, w, h);
  g.setColor(PgsLookAndFeel.getControlShadow());
  if (PlafOptions.isClearBorderEnabled()) {
    g.drawRect(x, y, w, h);
  } else {
    drawRoundRect(g, x, y, w, h, c1, c2);
  }
}
origin: com.github.arnabk/pgslookandfeel

public void initialize() {
  super.initialize();
  MetalLookAndFeel.setCurrentTheme(getCurrentTheme());
}
origin: com.github.arnabk/pgslookandfeel

  g.setColor(PgsLookAndFeel.getControlHighlight());
  g.fillRect(x, y, controlSize, controlSize);
      ColorUtils.getTranslucentColor(PgsLookAndFeel.getControlShadow(), 0),
      ColorUtils.getTranslucentColor(PgsLookAndFeel.getControlShadow(), 50));
    g.setColor(PgsLookAndFeel.getGlow());
    g.drawRect(x + 1, y + 1, controlSize - 3, controlSize - 3);
  g.setColor(PgsLookAndFeel.getControlDarkShadow());
  g.drawRect(x, y, controlSize - 1, controlSize - 1);
  if (model.isPressed() && model.isArmed()) {
    g.setColor(PgsLookAndFeel.getControlShadow());
    g.fillRect(x + 1, y + 1, controlSize - 2, controlSize - 2);
  g.setColor(PgsLookAndFeel.getControlInfo());
} else {
  g.setColor(PgsLookAndFeel.getControlShadow());
  g.drawRect(x, y, controlSize - 1, controlSize - 1);
      model.isEnabled() ? PgsLookAndFeel.getPrimaryControlDarkShadow()
          : PgsLookAndFeel.getControlShadow());
  drawCheck(c, g, x, y);
origin: com.github.arnabk/pgslookandfeel

  g.setColor(PgsLookAndFeel.getControlDarkShadow());
  g.drawLine(x + w - 1, y, x + w - 1, y + h);
  return;
gfx.setColor(PgsLookAndFeel.getControlDarkShadow());
if (isSubTab()) {
  switch (tabPlacement) {
origin: com.github.arnabk/pgslookandfeel

RenderingHints oldHints = gfx.getRenderingHints();
gfx.setRenderingHint(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
gfx.setColor(PgsLookAndFeel.getGlow());
Stroke oldStroke = gfx.getStroke();
gfx.setStroke(PgsUtils.rolloverBorderStroke);
origin: violetumleditor/violetumleditor

@Override
protected void configure()
{
  VistaTheme vistaTheme = new VistaTheme()
  {
    public ColorUIResource getMenuBackground()
    {
      return new ColorUIResource(new Color(255, 255, 255));
    }
    public ColorUIResource getSecondary3()
    {
      return new ColorUIResource(new Color(224, 231, 242));
    }
  };
  PgsLookAndFeel.setCurrentTheme(vistaTheme);
}
origin: com.github.arnabk/pgslookandfeel

public static void drawHorizontalBumps(Graphics g, int x, int y, int width) {
  int loops = width / 6;
  for (int i = 0; i < loops; i++) {
    g.setColor(PgsLookAndFeel.getControlShadow());
    g.fillRect(x + (i * 6), y, 2, 2);
    g.fillRect(3 + x + (i * 6), y + 3, 2, 2);
    g.setColor(ColorUtils.getTranslucentColor(PgsLookAndFeel.getControl(), 180));
    g.fillRect(1 + x + (i * 6), y + 1, 2, 2);
    g.fillRect(4 + x + (i * 6), y + 4, 2, 2);
  }
}
origin: com.github.arnabk/pgslookandfeel

g.setColor(PgsLookAndFeel.getControlDarkShadow());
PgsUtils.drawRoundRect(g, x, y, w - 1, h - 1);
      g.fillRect(selRect.x + 1, selRect.y + selRect.height - 2, selRect.width - 2, 1);
      if (selectedIndex == 0) {
        g.setColor(PgsLookAndFeel.getControlDarkShadow());
        g.drawLine(x, selRect.y + selRect.height - 2, x, selRect.y + selRect.height + 2);
      g.fillRect(selRect.x + 1, selRect.y + 1, selRect.width - 1, 1);
      if (selectedIndex == 0) {
        g.setColor(PgsLookAndFeel.getControlDarkShadow());
        g.drawLine(x, selRect.y - 2, x, selRect.y + 2);
      g.fillRect(selRect.x + selRect.width - 2, selRect.y + 1, 1, selRect.height - 1);
      if (selectedIndex == 0) {
        g.setColor(PgsLookAndFeel.getControlDarkShadow());
        g.drawLine(selRect.x + selRect.width - 2, selRect.y, selRect.x + selRect.width + 2, selRect.y);
      g.fillRect(selRect.x + 1, selRect.y + 1, 1, selRect.height - 1);
      if (selectedIndex == 0) {
        g.setColor(PgsLookAndFeel.getControlDarkShadow());
        g.drawLine(selRect.x - 2, selRect.y, selRect.x + 2, selRect.y);
com.pagosoft.plafPgsLookAndFeel

Most used methods

  • setCurrentTheme
  • getControl
  • getControlDarkShadow
  • getControlDisabled
  • getControlHighlight
  • getControlInfo
  • getControlShadow
  • getCurrentTheme
  • getGlow
  • getPrimaryControl
  • getPrimaryControlDarkShadow
  • getPrimaryControlHighlight
  • getPrimaryControlDarkShadow,
  • getPrimaryControlHighlight,
  • getPrimaryControlInfo,
  • getPrimaryControlShadow,
  • getPropertyBoolValue,
  • getPropertyStyleValue,
  • makeIcon,
  • setAsLookAndFeel,
  • updateAllUIs

Popular in Java

  • Finding current android device location
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • putExtra (Intent)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Option (scala)
  • Top 17 Plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now