Examples of DcPictureField


Examples of net.datacrow.console.components.DcPictureField

        JPanel panel = new JPanel();
        panel.setPreferredSize(new Dimension(200,150));
        panel.setLayout(Layout.getGBL());
       
        ImageIcon image;
        DcPictureField label;
        for (Picture picture : pictures) {
            if (picture != null && !picture.isDeleted()) {
                image = (ImageIcon) picture.getValue(Picture._D_IMAGE);
                if (image == null) {
                  picture.loadImage(false);
                  image = (ImageIcon) picture.getValue(Picture._D_IMAGE);
                }
               
                if (image == null) continue;
               
                label = ComponentFactory.getPictureField(true, false);
                label.setValue(image);
                panel.add(label, Layout.getGBC( 0, 0, 1, 1, 1.0, 1.0
                         ,GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
                          new Insets(0, 0, 0, 0), 0, 0));
                break;
            }
View Full Code Here

Examples of net.datacrow.console.components.DcPictureField

        //About panel
        //**********************************************************
        JPanel panelAbout = new JPanel();
        panelAbout.setLayout(Layout.getGBL());

        DcPictureField about = ComponentFactory.getPictureField(false, false);
        try {
            about.setValue(new URL("file://" + DataCrow.installationDir + "icons/aboutinformation.jpg"));
            panelAbout.add(about, Layout.getGBC(0, 0, 1, 1, 1.0, 1.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
            new Insets(5, 5, 5, 5), 0, 0));
        } catch (Exception e) {
            logger.error("Could not load the about image", e);
        }

        //**********************************************************
        //Credits
        //**********************************************************
        JPanel panelCredits = new JPanel();
        panelCredits.setLayout(Layout.getGBL());

        DcPictureField credits = ComponentFactory.getPictureField(false, false);
        try {
            credits.setValue(new URL("file://" + DataCrow.installationDir + "icons/aboutcredits.jpg"));
            panelCredits.add(credits, Layout.getGBC(0, 0, 1, 1, 1.0, 1.0,
            GridBagConstraints.NORTHWEST, GridBagConstraints.BOTH,
            new Insets(5, 5, 5, 5), 0, 0));
        } catch (Exception e) {
            logger.error("Could not load the credits image", e);
View Full Code Here

Examples of net.datacrow.console.components.DcPictureField

        dateField.setMinimumSize(new Dimension(50, getPreferredFieldHeight()));
        return dateField;
    }

    public static final DcPictureField getPictureField(boolean scaled, boolean allowActions) {
        DcPictureField pictureField = new DcPictureField(scaled, allowActions);
        return pictureField;
    }
View Full Code Here

Examples of net.datacrow.console.components.DcPictureField

        for (DcField field : dco.getFields()) {
            if (field.getValueType() == DcRepository.ValueTypes._PICTURE)
                cbFields.addItem(field);
        }
       
        DcPictureField picFld = ComponentFactory.getPictureField(true, false);
        picFld.setValue(image);
       
        getContentPane().setLayout(Layout.getGBL());
        getContentPane().add(ComponentFactory.getLabel("Picture field")
                Layout.getGBC( 0, 0, 1, 1, 1.0, 1.0
               ,GridBagConstraints.NORTHWEST, GridBagConstraints.NONE,
View Full Code Here

Examples of net.datacrow.console.components.DcPictureField

    public void createImageTabs(DcObject dco) {
        try {
            clearImages();
   
            Picture picture;
            DcPictureField picField;
            JPanel panel;

            for (DcFieldDefinition definition : dco.getModule().getFieldDefinitions().getDefinitions()) {
                if (dco.isEnabled(definition.getIndex()) &&
                    dco.getField(definition.getIndex()).getValueType() == DcRepository.ValueTypes._PICTURE) {
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.