This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 138128
Collapse All | Expand All

(-)a/openide.dialogs/apichanges.xml (+15 lines)
Lines 47-52 Link Here
47
<apidef name="dialogs">Dialogs API</apidef>
47
<apidef name="dialogs">Dialogs API</apidef>
48
</apidefs>
48
</apidefs>
49
<changes>
49
<changes>
50
    
51
    <change id="WizardDescriptor constants">
52
        <api name="dialogs"/>
53
        <summary>Wizard Descriptor constants introduced</summary>
54
        <version major="7" minor="8"/>
55
        <date day="30" month="6" year="2008"/>
56
        <author login="mkubec"/>
57
        <compatibility addition="yes"/>
58
        <description>
59
            Freeform strings are replaced by public constants.
60
        </description>
61
        <class package="org.openide" name="WizardDescriptor"/>
62
        <issue number="137737"/>
63
    </change>
64
    
50
    <change id="WizardDescriptor.ArrayIterator-generic-constructor">
65
    <change id="WizardDescriptor.ArrayIterator-generic-constructor">
51
        <api name="dialogs"/>
66
        <api name="dialogs"/>
52
        <summary>Generics-friendly constructor added for <code>WizardDescriptor.ArrayIterator</code></summary>
67
        <summary>Generics-friendly constructor added for <code>WizardDescriptor.ArrayIterator</code></summary>
(-)a/openide.dialogs/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.dialogs
2
OpenIDE-Module: org.openide.dialogs
3
OpenIDE-Module-Specification-Version: 7.7
3
OpenIDE-Module-Specification-Version: 7.8
4
OpenIDE-Module-Localizing-Bundle: org/openide/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/Bundle.properties
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
6
(-)a/openide.dialogs/src/org/openide/WizardDescriptor.java (-84 / +176 lines)
Lines 128-133 Link Here
128
    /** "Previous" button option.
128
    /** "Previous" button option.
129
    * @see #setOptions */
129
    * @see #setOptions */
130
    public static final Object PREVIOUS_OPTION = new String("PREVIOUS_OPTION"); // NOI18N
130
    public static final Object PREVIOUS_OPTION = new String("PREVIOUS_OPTION"); // NOI18N
131
    
131
    private static final ActionListener CLOSE_PREVENTER = new ActionListener() {
132
    private static final ActionListener CLOSE_PREVENTER = new ActionListener() {
132
            public void actionPerformed(ActionEvent evt) {
133
            public void actionPerformed(ActionEvent evt) {
133
            }
134
            }
Lines 138-230 Link Here
138
            }
139
            }
139
        };
140
        };
140
141
141
    /** <CODE>Boolean</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
142
    /** Set to <CODE>true</CODE> for enabling other properties. It is relevant only on
143
     * initialization (client property in first panel). Recommended to be set to <code>true</code> in most cases,
144
     * then wizard can display wizard steps on the left side, create a subtitle on active panel, 
145
     * display of error messages and others. When false or not present in JComponent.getClientProperty(), 
146
     * then supplied panel is used directly without content, help or panel name auto layout.
147
     * 
148
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
149
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
150
     * <CODE>Boolean</CODE> type property.
151
     */
152
    public static final String PROP_AUTO_WIZARD_STYLE = "WizardPanel_autoWizardStyle"; // NOI18N
153
154
    /** Set to <CODE>true</CODE> for showing help pane (HTML browser) in the left pane. It is relevant only on
155
     * initialization (client property in first panel). Help content will be taken from property <CODE>PROP_HELP_URL</CODE>.
156
     * 
157
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
158
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
159
     * <CODE>Boolean</CODE> type property.
160
     */
161
    public static final String PROP_HELP_DISPLAYED = "WizardPanel_helpDisplayed"; // NOI18N
162
163
    /** Set to <CODE>true</CODE> for showing content pane (steps) in the left pane. It is relevant only on
164
     * initialization (client property in first panel). Content will be constructed from property <CODE>PROP_CONTENT_DATA</code>.
165
     * 
166
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
142
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
167
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
143
     * Set to <CODE>true</CODE> for enabling other properties. It is relevant only on
168
     * <CODE>Boolean</CODE> type property.
169
     */
170
    public static final String PROP_CONTENT_DISPLAYED = "WizardPanel_contentDisplayed"; // NOI18N
171
172
    /** Set to <CODE>true</CODE> for displaying numbers in the content. It is relevant only on
144
     * initialization (client property in first panel).
173
     * initialization (client property in first panel).
145
     * When false or not present in JComponent.getClientProperty(), then supplied panel is
174
     * 
146
     * used directly without content, help or panel name auto layout.
175
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
176
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
177
     * <CODE>Boolean</CODE> type property.
147
     */
178
     */
148
    private static final String PROP_AUTO_WIZARD_STYLE = "WizardPanel_autoWizardStyle"; // NOI18N
179
    public static final String PROP_CONTENT_NUMBERED = "WizardPanel_contentNumbered"; // NOI18N
149
180
150
    /** <CODE>Boolean</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
181
    /** Represents index of content item which will be highlighted.
151
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
182
     * 
152
     * Set to <CODE>true</CODE> for showing help pane in the left pane. It is relevant only on
183
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
153
     * initialization (client property in first panel).
184
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
185
     * <CODE>Integer</CODE> type property.
154
     */
186
     */
155
    private static final String PROP_HELP_DISPLAYED = "WizardPanel_helpDisplayed"; // NOI18N
187
    public static final String PROP_CONTENT_SELECTED_INDEX = "WizardPanel_contentSelectedIndex"; // NOI18N
156
188
157
    /** <CODE>Boolean</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
189
    /** Represents array of content items.
158
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
190
     * 
159
     * Set to <CODE>true</CODE> for showing content pane in the left pane. It is relevant only on
191
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
160
     * initialization (client property in first panel).
192
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
193
     * <CODE>String[]</CODE> type property.
161
     */
194
     */
162
    private static final String PROP_CONTENT_DISPLAYED = "WizardPanel_contentDisplayed"; // NOI18N
195
    public static final String PROP_CONTENT_DATA = "WizardPanel_contentData"; // NOI18N
163
196
164
    /** <CODE>Boolean</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
197
    /** Set background color of content pane.
165
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
198
     * 
166
     * Set to <CODE>true</CODE> for displaying numbers in the content. It is relevant only on
199
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
167
     * initialization (client property in first panel).
200
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
201
     * <CODE>Color</CODE> type property.
168
     */
202
     */
169
    private static final String PROP_CONTENT_NUMBERED = "WizardPanel_contentNumbered"; // NOI18N
203
    public static final String PROP_CONTENT_BACK_COLOR = "WizardPanel_contentBackColor"; // NOI18N
170
204
171
    /** <CODE>Integer</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
205
    /** Set foreground color of content pane.
172
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
206
     * 
173
     * Represents index of content item which will be highlited.
207
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
208
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order. 
209
     * <CODE>Color</CODE> type property.
174
     */
210
     */
175
    private static final String PROP_CONTENT_SELECTED_INDEX = "WizardPanel_contentSelectedIndex"; // NOI18N
211
    public static final String PROP_CONTENT_FOREGROUND_COLOR = "WizardPanel_contentForegroundColor"; // NOI18N
212
    
213
    /** Set the image which will be displayed in the left pane (behind the content).
214
     * 
215
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
216
     * <CODE>((JComponent) Panel.getComponent()).getClientProperty()</CODE> in this order. 
217
     * <CODE>java.awt.Image</CODE> type property. 
218
     */
219
    public static final String PROP_IMAGE = "WizardPanel_image"; // NOI18N
176
220
177
    /** <CODE>String[]</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
221
    /** Set the side where the image should be drawn.
178
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
222
     * 
179
     * Represents array of content items.
223
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
224
     * <CODE>((JComponent) Panel.getComponent()).getClientProperty()</CODE> in this order. 
225
     * <CODE>String</CODE> type property.
180
     */
226
     */
181
    private static final String PROP_CONTENT_DATA = "WizardPanel_contentData"; // NOI18N
227
    public static final String PROP_IMAGE_ALIGNMENT = "WizardPanel_imageAlignment"; // NOI18N
182
228
183
    /** <CODE>Color</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
229
    /** Dimension of left pane, should be same as dimension of <CODE>PROP_IMAGE</CODE>.
184
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
230
     * It is relevant only on initialization (client property in first panel).
185
     * Set to background color of content pane.
231
     * 
232
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
233
     * <CODE>((JComponent) Panel.getComponent()).getClientProperty()</CODE> in this order. 
234
     * <CODE>Dimension</CODE> type property.
186
     */
235
     */
187
    private static final String PROP_CONTENT_BACK_COLOR = "WizardPanel_contentBackColor"; // NOI18N
236
    public static final String PROP_LEFT_DIMENSION = "WizardPanel_leftDimension"; // NOI18N
188
237
189
    /** <CODE>Color</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
238
    /** Represents URL of help displayed in left pane.
190
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
239
     * 
191
     * Set to foreground color of content pane.
240
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
241
     * <CODE>((JComponent) Panel.getComponent()).getClientProperty()</CODE> in this order. 
242
     * <CODE>URL</CODE> type property.
192
     */
243
     */
193
    private static final String PROP_CONTENT_FOREGROUND_COLOR = "WizardPanel_contentForegroundColor"; // NOI18N
244
    public static final String PROP_HELP_URL = "WizardPanel_helpURL"; // NOI18N
194
245
195
    /** <CODE>Image</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
246
    /** Error message that is displayed at the bottom of the wizard.
196
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
247
     * Message informs user why the panel is invalid and possibly why the Next/Finish buttons were disabled.
197
     * Set to image which should be displayed in the left pane (behind the content).
248
     * The property must be set to null value to clear the message.
198
     */
249
     * 
199
    private static final String PROP_IMAGE = "WizardPanel_image"; // NOI18N
250
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE>. 
200
251
     * <CODE>String</CODE> type property. 
201
    /** <CODE>String</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
202
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
203
     * Set to side where the image should be drawn.
204
     */
205
    private static final String PROP_IMAGE_ALIGNMENT = "WizardPanel_imageAlignment"; // NOI18N
206
207
    /** <CODE>Dimension</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
208
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
209
     * Dimension of left pane, should be same as dimension of <CODE>PROP_IMAGE</CODE>.
210
     * It is relevant only on initialization (client property in first panel).
211
     */
212
    private static final String PROP_LEFT_DIMENSION = "WizardPanel_leftDimension"; // NOI18N
213
214
    /** <CODE>URL</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE> or
215
     * <CODE>((JComponent)Panel.getComponent()).getClientProperty()</CODE> in this order.
216
     * Represents URL of help displayed in left pane.
217
     */
218
    private static final String PROP_HELP_URL = "WizardPanel_helpURL"; // NOI18N
219
220
    /** <CODE>String</CODE> property. The value is taken from <CODE>WizardDescriptor.getProperty()</CODE>.
221
     * If it contains non-null value the String is displayed the bottom of the wizard
222
     * and should inform user why the panel is invalid and why the Next/Finish
223
     * buttons were disabled.
224
     * @since 3.39
252
     * @since 3.39
225
     */
253
     */
226
    private static final String PROP_ERROR_MESSAGE = "WizardPanel_errorMessage"; // NOI18N
254
    public static final String PROP_ERROR_MESSAGE = "WizardPanel_errorMessage"; // NOI18N
227
255
    
256
    /** Warning message that is displayed at the bottom of the wizard.
257
     * Message informs user about possible non fatal problems with current enterd values in the wizard panel.
258
     * Next/Finish buttons are usually enabled. The property must be set to null value to clear the message.
259
     * 
260
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE>. 
261
     * <CODE>String</CODE> type property.
262
     * @since 7.8
263
     */
264
    public static final String PROP_WARNING_MESSAGE = "WizardPanel_warningMessage"; // NOI18N
265
    
266
    /** Informational message that is displayed at the bottom of the wizard.
267
     * Message informs user usually about need to fill some field or similar requirements or other non fatal problems.
268
     * Next/Finish button are usually enabled. The property must be set to null value to clear the message.
269
     * 
270
     * The value is taken from <CODE>WizardDescriptor.getProperty()</CODE>. 
271
     * <CODE>String</CODE> type property.
272
     * @since 7.8
273
     */
274
    public static final String PROP_INFO_MESSAGE = "WizardPanel_infoMessage"; // NOI18N
275
    
228
    private static Logger err = Logger.getLogger(WizardDescriptor.class.getName ());
276
    private static Logger err = Logger.getLogger(WizardDescriptor.class.getName ());
229
277
230
    /** real buttons to be placed instead of the options */
278
    /** real buttons to be placed instead of the options */
Lines 657-667 Link Here
657
            if (wizardPanel != null) {
705
            if (wizardPanel != null) {
658
                SwingUtilities.invokeLater (new Runnable () {
706
                SwingUtilities.invokeLater (new Runnable () {
659
                    public void run () {
707
                    public void run () {
660
                        wizardPanel.setErrorMessage((String) ((value == null) ? " " : value), (nextButton.isEnabled () || finishButton.isEnabled ()) ? Boolean.TRUE : Boolean.FALSE); //NOI18N
708
                        if (nextButton.isEnabled () || finishButton.isEnabled ()) {
709
                            wizardPanel.setMessage(WizardPanel.MSG_TYPE_WARNING, (String) ((value == null) ? "" : value));
710
                        } else {
711
                            wizardPanel.setMessage(WizardPanel.MSG_TYPE_ERROR, (String) ((value == null) ? "" : value));
712
                        }
661
                    }
713
                    }
662
                });
714
                });
663
            }
715
            }
664
        }
716
        }
717
        
718
        if (PROP_WARNING_MESSAGE.equals(name) || PROP_INFO_MESSAGE.equals(name)) {
719
            if (wizardPanel != null) {
720
                SwingUtilities.invokeLater (new Runnable () {
721
                    public void run () {
722
                        if (PROP_WARNING_MESSAGE.equals(name)) {
723
                            wizardPanel.setMessage(WizardPanel.MSG_TYPE_WARNING, (String) ((value == null) ? "" : value)); //NOI18N
724
                        } else {
725
                            wizardPanel.setMessage(WizardPanel.MSG_TYPE_INFO, (String) ((value == null) ? "" : value)); //NOI18N
726
                        }
727
                    }
728
                });
729
            }
730
        }
731
        
665
    }
732
    }
666
733
667
    /** Getter for stored property.
734
    /** Getter for stored property.
Lines 1287-1293 Link Here
1287
                    
1354
                    
1288
                    // cannot continue, notify user
1355
                    // cannot continue, notify user
1289
                    if (wizardPanel != null) {
1356
                    if (wizardPanel != null) {
1290
                        wizardPanel.setErrorMessage(wve.getLocalizedMessage(), Boolean.FALSE);
1357
                        wizardPanel.setMessage(WizardPanel.MSG_TYPE_ERROR, wve.getLocalizedMessage());
1291
                    }
1358
                    }
1292
1359
1293
                    // focus source of this problem
1360
                    // focus source of this problem
Lines 1842-1848 Link Here
1842
        public void actionPerformed(ActionEvent ev) {
1909
        public void actionPerformed(ActionEvent ev) {
1843
            final Iterator<?> panels = data.getIterator(WizardDescriptor.this);
1910
            final Iterator<?> panels = data.getIterator(WizardDescriptor.this);
1844
            if (wizardPanel != null) {
1911
            if (wizardPanel != null) {
1845
                wizardPanel.setErrorMessage(" ", null); //NOI18N
1912
                wizardPanel.setMessage(WizardPanel.MSG_TYPE_ERROR, ""); //NOI18N
1846
            }
1913
            }
1847
1914
1848
            Object src = ev.getSource();
1915
            Object src = ev.getSource();
Lines 2302-2311 Link Here
2302
2369
2303
        /** Selected index of content */
2370
        /** Selected index of content */
2304
        private int selectedIndex;
2371
        private int selectedIndex;
2305
        private javax.swing.JLabel m_lblMessage;
2372
        private JLabel m_lblMessage;
2373
        
2306
        private Color nbErrorForeground;
2374
        private Color nbErrorForeground;
2307
        private Color nbWarningForeground;
2375
        private Color nbWarningForeground;
2308
2376
        private Color nbInfoForeground;
2377
        
2378
        private static final int MSG_TYPE_ERROR = 1;
2379
        private static final int MSG_TYPE_WARNING = 2;
2380
        private static final int MSG_TYPE_INFO = 3;
2381
        
2309
        /** Creates new <CODE>WizardPanel<CODE>.
2382
        /** Creates new <CODE>WizardPanel<CODE>.
2310
         * @param contentDisplayed whether content will be displayed in the left pane
2383
         * @param contentDisplayed whether content will be displayed in the left pane
2311
         * @param helpDisplayed whether help will be displayed in the left pane
2384
         * @param helpDisplayed whether help will be displayed in the left pane
Lines 2372-2377 Link Here
2372
                nbWarningForeground = new Color(51, 51, 51); // Label.foreground
2445
                nbWarningForeground = new Color(51, 51, 51); // Label.foreground
2373
            }
2446
            }
2374
            
2447
            
2448
            nbInfoForeground = UIManager.getColor("nb.warningForeground"); //NOI18N
2449
            if (nbInfoForeground == null) {
2450
                nbInfoForeground = UIManager.getColor("Label.foreground"); //NOI18N
2451
            }
2452
            
2375
            JPanel errorPanel = new JPanel(new BorderLayout());
2453
            JPanel errorPanel = new JPanel(new BorderLayout());
2376
            errorPanel.setBorder(BorderFactory.createEmptyBorder(0, 12, 12, 11));
2454
            errorPanel.setBorder(BorderFactory.createEmptyBorder(0, 12, 12, 11));
2377
            m_lblMessage = new FixedHeightLabel ();
2455
            m_lblMessage = new FixedHeightLabel ();
Lines 2415-2437 Link Here
2415
                add(sep, BorderLayout.SOUTH);
2493
                add(sep, BorderLayout.SOUTH);
2416
            }
2494
            }
2417
        }
2495
        }
2418
2496
        
2419
        public void setErrorMessage(String msg, Boolean canContinue) {
2497
        public void setMessage(int msgType, String msg) {
2420
            m_lblMessage.setForeground(nbErrorForeground);
2498
            if (msg != null && msg.trim().length() > 0) {
2421
            if (msg != null && msg.trim ().length () > 0 && canContinue != null) {
2499
                switch (msgType) {
2422
                if (canContinue.booleanValue ()) {
2500
                    case MSG_TYPE_ERROR:
2423
                    m_lblMessage.setIcon (new ImageIcon (Utilities.loadImage ("org/netbeans/modules/dialogs/warning.gif"))); // NOI18N
2501
                        prepareMessage(m_lblMessage,
2424
                    m_lblMessage.setForeground (nbWarningForeground);
2502
                            new ImageIcon (Utilities.loadImage ("org/netbeans/modules/dialogs/error.gif")),
2425
                } else {
2503
                            nbErrorForeground);
2426
                    m_lblMessage.setIcon (new ImageIcon (Utilities.loadImage ("org/netbeans/modules/dialogs/error.gif"))); // NOI18N
2504
                        break;
2505
                    case MSG_TYPE_WARNING:
2506
                        prepareMessage(m_lblMessage, 
2507
                            new ImageIcon (Utilities.loadImage ("org/netbeans/modules/dialogs/warning.gif")),
2508
                            nbWarningForeground);
2509
                        break;
2510
                    case MSG_TYPE_INFO:
2511
                        prepareMessage(m_lblMessage, 
2512
                            new ImageIcon (Utilities.loadImage ("org/netbeans/modules/dialogs/info.png")),
2513
                            nbInfoForeground);
2514
                        break;
2515
                    default:
2427
                }
2516
                }
2428
                m_lblMessage.setToolTipText (msg);
2517
                m_lblMessage.setToolTipText (msg);
2429
            } else {
2518
            } else {
2430
                m_lblMessage.setIcon (null);
2519
                prepareMessage(m_lblMessage, null, null);
2431
                m_lblMessage.setToolTipText (null);
2432
            }
2520
            }
2433
            
2434
            m_lblMessage.setText(msg);
2521
            m_lblMessage.setText(msg);
2522
        }
2523
        
2524
        private void prepareMessage(JLabel label, ImageIcon icon, Color fgColor) {
2525
            label.setIcon(icon);
2526
            label.setForeground(fgColor);
2435
        }
2527
        }
2436
        
2528
        
2437
        private void setProgressComponent (JComponent progressComp, JLabel progressLabel) {
2529
        private void setProgressComponent (JComponent progressComp, JLabel progressLabel) {

Return to bug 138128