Package javax.swing

Examples of javax.swing.JComponent$AncestorComponentNotifier


            labels.put(field, ComponentFactory.getLabel(dco.getLabel(index)));
            if (index == DcObject._ID) {
                fields.put(field, ComponentFactory.getIdFieldDisabled());
            } else {
                JComponent c = ComponentFactory.getComponent(field.getModule(),
                                                             field.getReferenceIdx(),
                                                             field.getIndex(),
                                                             field.getFieldType(),
                                                             field.getLabel(),
                                                             field.getMaximumLength());
View Full Code Here


            int y = positions.get(name).intValue();
           
            int fieldIdx = definition.getIndex();
            DcField field = dco.getField(fieldIdx);
            JLabel label = labels.get(field);
            JComponent component = fields.get(field);
           
          if ((!field.isUiOnly() || field.getValueType() == DcRepository.ValueTypes._DCOBJECTCOLLECTION) &&
                field.isEnabled() &&
                  field.getValueType() != DcRepository.ValueTypes._PICTURE && // check the field type
                  field.getValueType() != DcRepository.ValueTypes._ICON &&
View Full Code Here

        DcModule module = DcModules.get(moduleIdx);

        for (DcFieldDefinition definition : module.getFieldDefinitions().getDefinitions()) {
            int index = definition.getIndex();
            DcField field = dco.getField(index);
            JComponent component = fields.get(field);

            if (field.isEnabled() &&
               (field.getValueType() == DcRepository.ValueTypes._PICTURE ||
                field.getValueType() == DcRepository.ValueTypes._ICON)) {

                JPanel panel = new JPanel();
                panel.setLayout(Layout.getGBL());

                component.setPreferredSize(component.getMinimumSize());
                panel.add(component, Layout.getGBC(0, 0, 1, 1, 1.0, 1.0
                         ,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
                          new Insets(5, 5, 5, 5), 0, 0));

                if (field.isReadOnly())
View Full Code Here

   
    @Override
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {

        JComponent c = (JComponent) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
       
        if (value instanceof Picture && ((Picture) value).hasImage()) {
            setIcon(IconLibrary._icoPicture);
            setForeground(this.getBackground());
        } else {
View Full Code Here

   
    @Override
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
       
        JComponent c = (JComponent) super.getTableCellRendererComponent(table, 
                                            value,
                                            isSelected,
                                            hasFocus,
                                            row,
                                            column);       
View Full Code Here

   
    @Override
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
       
        JComponent c = (JComponent) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
       
        if (((DcTable) table).isIgnoringPaintRequests())
            return c;
       
        ((DcTable) table).load(row);
View Full Code Here

   
    @Override
    public Component getTableCellRendererComponent(
            JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column) {
       
        JComponent c = (JComponent) super.getTableCellRendererComponent(table, value, isSelected, hasFocus, row, column);
       
        if (value instanceof XmlField) {
            XmlField field = (XmlField) value;
            if (!field.isOverwritable()) {
                Font font = c.getFont();
                font = new Font(font.getName(), Font.ITALIC, font.getSize());
                c.setFont(font);
            } else {
                Font font = c.getFont();
                font = new Font(font.getName(), Font.BOLD, font.getSize());
                c.setFont(font);
            }
        }
       
        return c;
    }
View Full Code Here

    Object anchor = null;

    if (anchorNode != null) {
      anchor = af.constructAnchor(anchorNode);
      if (anchor instanceof AnchorFactory.BoxAnchor) {
        JComponent component = (JComponent) widget.getWidget();

        AnchorFactory.BoxAnchor ba = (AnchorFactory.BoxAnchor) anchor;
        component.setAlignmentX(ba.getAlignmentX());
        component.setAlignmentY(ba.getAlignmentY());
        anchor = null;
      }
    } else {
      Object comp = widget.getWidget();

      if (comp != null && comp instanceof JComponent) {
        JComponent component = (JComponent) comp;

        component.setAlignmentX(0.0f);
        component.setAlignmentY(0.0f);
      }
    }

    return anchor;
  }
View Full Code Here

    }

    class UndoAction extends BaseAction {
        public void action() {
            try {
                JComponent focused = Globals.focusListener.getFocused();
                if ((focused != null) && (focused instanceof FieldEditor) && (focused.hasFocus())) {
                    // User is currently editing a field:
                    // Check if it is the preamble:
                    if ((preambleEditor != null) && (focused == preambleEditor.getFieldEditor())) {
                        preambleEditor.storeCurrentEdit();
                    }
View Full Code Here

    class RedoAction extends BaseAction {

        public void action() {
            try {

                JComponent focused = Globals.focusListener.getFocused();
                if ((focused != null) && (focused instanceof FieldEditor) && (focused.hasFocus())) {
                    // User is currently editing a field:
                    storeCurrentEdit();
                }

                String name = undoManager.getRedoPresentationName();
View Full Code Here

TOP

Related Classes of javax.swing.JComponent$AncestorComponentNotifier

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.