Examples of FontDialog


Examples of at.bestsolution.drawswf.dialog.FontDialog

  //----------------------------------------------------------------------------
  private void showFontDialog()
  {
    if (font_dialog_ == null)
    {
      font_dialog_ = new FontDialog(MainWindow.MAIN_WINDOW);
    }

    font_dialog_.removeAllChangeListeners();
    font_dialog_.addChangeListener(this);
View Full Code Here

Examples of at.bestsolution.drawswf.dialog.FontDialog

   */
  public void stateChanged(ChangeEvent e)
  {
    if (e.getSource() instanceof FontDialog)
    {
      FontDialog dialog = (FontDialog) e.getSource();

      font_ = dialog.getDrawSWFFont();
      repaint();
    }
  }
View Full Code Here

Examples of net.sf.soundcomp.ide.dialog.FontDialog

        setToolBar(toolBar);
    }// </editor-fold>//GEN-END:initComponents

    private void setFontMenuItemActionPerformed(ActionEvent evt) {//GEN-FIRST:event_setFontMenuItemActionPerformed
        if (activePanel instanceof TextPanel) {
            FontDialog dlg = new FontDialog(((SingleFrameApplication) getApplication()).getMainFrame(), true);
            dlg.setLocationRelativeTo(dlg.getParent());
            ((TextPanel)activePanel).showFontDialog(dlg);
        }
}//GEN-LAST:event_setFontMenuItemActionPerformed
View Full Code Here

Examples of nu.fw.jeti.plugins.xhtml.fontchooser.FontDialog

        putValue(MNEMONIC_KEY, mnemonic);
    }
   
    public void actionPerformed(ActionEvent e) {
    AttributeSet attr = new SimpleAttributeSet();
    FontDialog fontD = new FontDialog(frame, I18N.getText("drawing","Choose_font"), attr);
    fontD.setModal(true);
    fontD.setVisible(true);

    attr = fontD.getAttributes();
    String family = StyleConstants.getFontFamily(attr);
    if (family != null) {
      board.setFontFamily(family);
    }
    int size = StyleConstants.getFontSize(attr);
View Full Code Here

Examples of nu.fw.jeti.plugins.xhtml.fontchooser.FontDialog

      public void actionPerformed(ActionEvent e)
      {

        AttributeSet attr = txtInvoer.getCharacterAttributes(); //new SimpleAttributeSet();
        Frame frame = JOptionPane.getFrameForComponent(txtInvoer.getTopLevelAncestor());
        FontDialog d = new FontDialog(frame , I18N.gettext("xhtml.Choose_Font"), attr);
        d.setModal(true);
        d.setVisible(true);

        if (d.getResult() == DialogShell.RESULT_OK)
        {
          attr = d.getAttributes();
//          StyleConstants.setBold((MutableAttributeSet)attr,false);
//           if (attr.isDefined(CSS.Attribute.FONT_WEIGHT)) {
//                    String value = attr.getAttribute(CSS.Attribute.FONT_WEIGHT).toString();
//                    if (value.equalsIgnoreCase(StyleConstants.Bold.toString()))
//                         StyleConstants.setBold((MutableAttributeSet)attr,true);
View Full Code Here

Examples of org.eclipse.swt.widgets.FontDialog

      new Label(s, SWT.NONE);
      final Button btnChange = new Button(s, SWT.PUSH | SWT.BORDER);
      btnChange.setText("Change Font");
      btnChange.addSelectionListener(new SelectionAdapter() {
        public void widgetSelected(SelectionEvent e) {
          FontDialog fd = new FontDialog(s, SWT.NONE);
          fd.setText("Select Font");
          fd.setRGB(t.getForeground().getRGB());
          fd.setFontList(t.getFont().getFontData());

           FontData newFont = fd.open();
          if(newFont==null)
              return;
          t.setFont(new Font(d, newFont));
          t.setForeground(new Color(d, fd.getRGB()));
         
        }
      });
     
      Button btnSave = new Button(s, SWT.NONE);
View Full Code Here

Examples of org.eclipse.swt.widgets.FontDialog

                    new Object[] { value }));
        }
        valueChanged(oldValidState, newValidState);
    }   
  protected Object openDialogBox(Control cellEditorWindow) {
    FontDialog dialog = new FontDialog(cellEditorWindow.getShell());
    Object value = getValue();
    if (value != null) {
      dialog.setFontList(new FontData[] { (FontData) value });
    }
    value = dialog.open();
    FontData[] list = dialog.getFontList();
    return list == null ? null : list.length > 0 ? list[0] : null;
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.FontDialog

    public boolean isDone() {
        return true;
    }

    public void perform() {
        dialog = new FontDialog(Display.getCurrent().getActiveShell());
        Font oldFont = getBoxPrinter().getFont();
        if (oldFont != null) {
            FontData fData = new FontData(oldFont.getName(), oldFont.getSize(), oldFont.getStyle());
            dialog.setFontList(new FontData[]{fData});
            Color fontColor = getBoxPrinter().getFontColor();
View Full Code Here

Examples of org.eclipse.swt.widgets.FontDialog

        fFont = new Font[1];
        fColor = new Color[1];

        fButton.setText(Messages.FontEditor_0);
        labelFontDialog = new FontDialog(new Shell());
        labelFontDialog.setText("Choose a Font"); //$NON-NLS-1$

        fButton.setImage(fImage);
        fButton.addSelectionListener(new SelectionAdapter(){
            public void widgetSelected( SelectionEvent event ) {
View Full Code Here

Examples of org.eclipse.swt.widgets.FontDialog

        button.addListener(SWT.Selection, new Listener(){

            public void handleEvent( Event event ) {

                final FontDialog dialog = new FontDialog(button.getShell());

                // setup default font
                IBlackboard blackboard = getStyleBlackboard();
                FontStyle fontStyle = (FontStyle) blackboard.get(FontStyleContent.ID);
                if (fontStyle != null) {
                    Font f = fontStyle.getFont();
                    FontData[] fd = AWTSWTImageUtils.awtFontToSwt(f,JFaceResources.getFontRegistry()).getFontData();
                    dialog.setFontList(fd);
                }
                // show dialog and get results
                FontData result = dialog.open();
                if (result != null) {
                    Font awtfont = AWTSWTImageUtils.swtFontToAwt(result);
                    fontStyle.setFont(awtfont);

                    swtFont = AWTSWTImageUtils.awtFontToSwt(awtfont, JFaceResources
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.