use of com.microsoft.intellij.helpers.LinkListener in project azure-tools-for-java by Microsoft.
the class CreateRedisCacheForm method initWidgetListeners.
private void initWidgetListeners() {
txtRedisName.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void removeUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void changedUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
});
cbSubs.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
currentSub = (SubscriptionDetail) cbSubs.getSelectedItem();
fillLocationsAndResourceGrps(currentSub);
validateEmptyFields();
}
});
rdoCreateNewGrp.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
txtNewResGrp.setVisible(true);
cbUseExist.setVisible(false);
newResGrp = true;
validateEmptyFields();
}
});
txtNewResGrp.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void removeUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void changedUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
});
rdoUseExist.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
txtNewResGrp.setVisible(false);
cbUseExist.setVisible(true);
newResGrp = false;
validateEmptyFields();
}
});
cbUseExist.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateEmptyFields();
}
});
cbLocations.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateEmptyFields();
}
});
lblPricing.addMouseListener(new LinkListener(PRICING_LINK));
cbPricing.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateEmptyFields();
}
});
chkNoSSL.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (chkNoSSL.isSelected()) {
noSSLPort = true;
} else {
noSSLPort = false;
}
}
});
cbLocations.setRenderer(new ListCellRendererWrapper<Object>() {
@Override
public void customize(JList jList, Object o, int i, boolean b, boolean b1) {
if (o != null && (o instanceof Location)) {
setText(" " + ((Location) o).displayName());
}
}
});
}
use of com.microsoft.intellij.helpers.LinkListener in project azure-tools-for-java by Microsoft.
the class CreateRedisCacheForm method initWidgetListeners.
private void initWidgetListeners() {
txtRedisName.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void removeUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void changedUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
});
cbSubs.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
currentSub = (Subscription) cbSubs.getSelectedItem();
cbLocations.setSubscription(currentSub);
fillResourceGrps(currentSub);
validateEmptyFields();
}
});
rdoCreateNewGrp.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
txtNewResGrp.setVisible(true);
cbUseExist.setVisible(false);
newResGrp = true;
validateEmptyFields();
}
});
txtNewResGrp.getDocument().addDocumentListener(new DocumentListener() {
@Override
public void insertUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void removeUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
@Override
public void changedUpdate(DocumentEvent documentEvent) {
validateEmptyFields();
}
});
rdoUseExist.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
txtNewResGrp.setVisible(false);
cbUseExist.setVisible(true);
newResGrp = false;
validateEmptyFields();
}
});
cbUseExist.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateEmptyFields();
}
});
cbLocations.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateEmptyFields();
}
});
lblPricing.addMouseListener(new LinkListener(PRICING_LINK));
cbPricing.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
validateEmptyFields();
}
});
chkNoSSL.addMouseListener(new MouseAdapter() {
@Override
public void mouseClicked(MouseEvent e) {
if (chkNoSSL.isSelected()) {
noSSLPort = true;
} else {
noSSLPort = false;
}
}
});
}
Aggregations