Package DisplayProject

Examples of DisplayProject.GridTitledBorder


                    ((TitledBorder) border).setTitle("");
                }
            } else {
                if (pCaption != null) {
                    // TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    if (this.captionFont != null) {
                        tb.setTitleFont(this.captionFont);
                    }
                    setBorder(tb);
                }
            }
        } else {
          GridTitledBorder gridBorder;
            if (pCaption != null) {
              gridBorder = new GridTitledBorder(pCaption.toString());
            } else {
              gridBorder = new GridTitledBorder("");
            }
            if (this.captionFont != null) {
              gridBorder.setTitleFont(this.captionFont);
            }
            setBorder(gridBorder);
        }
    }
View Full Code Here


                    ((TitledBorder) border).setTitle("");
                }
            } else {
                if (pCaption != null) {
                    // TitledBorder tb = BorderFactory.createTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    TitledBorder tb = new GridTitledBorder(border, caption.toString(), TitledBorder.LEFT, TitledBorder.TOP);
                    if (this.captionFont != null) {
                        tb.setTitleFont(this.captionFont);
                    }
                    setBorder(tb);
                }
            }
        } else {
          GridTitledBorder gridBorder;
            if (pCaption != null) {
              gridBorder = new GridTitledBorder(pCaption.toString());
            } else {
              gridBorder = new GridTitledBorder("");
            }
            if (this.captionFont != null) {
              gridBorder.setTitleFont(this.captionFont);
            }
            setBorder(gridBorder);
        }
    }
View Full Code Here

            JComponent c = (JComponent)this._component;
            Border border = c.getBorder();
            if ((border == null) || (border instanceof EmptyBorder)) {
              // TF:18/09/2009:Corrected this to use a GridTitledBorder, which better understands
              // how to handle frame weights and frame colours
              GridTitledBorder gtb = new GridTitledBorder();
              gtb.setFrameWeight(Constants.W_NONE);
              gtb.setFrameColor(UIutils.forteToJavaColor(color));
              c.setBorder(gtb);
//                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color)));
            }
            else if ((border != null) && (border instanceof GridTitledBorder)) {
                // TF:6/9/07:Added the functionality to use the GridTitledBorder for proper behaviour
                GridTitledBorder gridBorder = (GridTitledBorder)border;
                gridBorder.setFrameColor(UIutils.forteToJavaColor(color));
                c.repaint();
            }
            else if ((border != null) && (border instanceof TitledBorder))
            {
                TitledBorder titledBorder = (TitledBorder)border;
View Full Code Here

                break;
            }
            jc.setBorder(newBorder);
        } else {
            String caption = (String)jc.getClientProperty("qq_caption");
            GridTitledBorder gtb = new GridTitledBorder(null, caption);
            gtb.setFrameWeight(weight);
            jc.setBorder(gtb);
        }
    }
View Full Code Here

                break;
            }
            jc.setBorder(newBorder);
        } else {
            String caption = (String)jc.getClientProperty("qq_caption");
            GridTitledBorder gtb = new GridTitledBorder(null, caption);
            gtb.setFrameWeight(weight);
            jc.setBorder(gtb);
        }
    }
View Full Code Here

            JComponent c = (JComponent)this._component;
            Border border = c.getBorder();
            if ((border == null) || (border instanceof EmptyBorder)) {
              // TF:18/09/2009:Corrected this to use a GridTitledBorder, which better understands
              // how to handle frame weights and frame colours
              GridTitledBorder gtb = new GridTitledBorder();
              gtb.setFrameWeight(Constants.W_NONE);
              gtb.setFrameColor(UIutils.forteToJavaColor(color));
              c.setBorder(gtb);
//                c.setBorder(new LineBorderWithColour(UIutils.forteToJavaColor(color)));
            }
            else if ((border != null) && (border instanceof GridTitledBorder)) {
                // TF:6/9/07:Added the functionality to use the GridTitledBorder for proper behaviour
                GridTitledBorder gridBorder = (GridTitledBorder)border;
                gridBorder.setFrameColor(UIutils.forteToJavaColor(color));
                c.repaint();
            }
            else if ((border != null) && (border instanceof TitledBorder))
            {
                TitledBorder titledBorder = (TitledBorder)border;
View Full Code Here

            }
          }
        } else {
          if ((caption != null) && (!(caption.length()==0))) {//PM:7 oct. 2008:performance improvement
            // CraigM:26/08/2008 - Fixed to set the border variable
            border = new GridTitledBorder(caption.toString());
            // panel.setBorder(BorderFactory.createTitledBorder(caption.toString()));
            panel.setBorder(border);
            Font titleFont = (Font)panel.getClientProperty("qq_CaptionFont");
            if (titleFont != null) {
              ((TitledBorder)border).setTitleFont(titleFont);
View Full Code Here

    }
  }
 
  private Border setCaptionInBorder(Border border, String caption){
    //        return BorderFactory.createTitledBorder(border, caption, TitledBorder.LEFT, TitledBorder.TOP);
    return new GridTitledBorder(border, caption, TitledBorder.LEFT, TitledBorder.TOP);
  }
View Full Code Here

            }
          }
        } else {
          if ((caption != null) && (!(caption.length()==0))) {//PM:7 oct. 2008:performance improvement
            // CraigM:26/08/2008 - Fixed to set the border variable
            border = new GridTitledBorder(caption.toString());
            // panel.setBorder(BorderFactory.createTitledBorder(caption.toString()));
            panel.setBorder(border);
            Font titleFont = (Font)panel.getClientProperty("qq_CaptionFont");
            if (titleFont != null) {
              ((TitledBorder)border).setTitleFont(titleFont);
View Full Code Here

    }
  }
 
  private Border setCaptionInBorder(Border border, String caption){
    //        return BorderFactory.createTitledBorder(border, caption, TitledBorder.LEFT, TitledBorder.TOP);
    return new GridTitledBorder(border, caption, TitledBorder.LEFT, TitledBorder.TOP);
  }
View Full Code Here

TOP

Related Classes of DisplayProject.GridTitledBorder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.